Is there a way to write a letter to the physician regarding the patient? The physician name is a combo field in the customer form. Also wd like to pull the address of the physician from the physician table. What wd the VBA look like if it can be done?
I am still learning and a novice at VBA. I don't. Know how to Dlookup a combo field from the customer form? Or am I doing Dlookup from the physician table? How would I write the VBA for this? Do I have to add the PhysicianID to the Contact form ?
Adam Schwanz 8 months ago
You would make an unbound text box and make the control source something like
You'll have to replace your field names as necessary. This is assuming that you're using the "standard" combo box setup Richard shows all the time of the ID field being the bound field and then the name field.
Rajashree Natarajan 8 months ago
Thank you for this. Will it work in this case as the combo box in in the customer form and not in the contact form. I need to pull the name from the combo box in the customer form to populate on the contact form. This will help if I have to send a letter to the physician. I already have a letter template to the physician in my template combo in the contact form.
Adam Schwanz 8 months ago
If the combobox you're using as the criteria is on another form, you just need to refer the correct location, instead of ComboBoxName do Forms!CustomerF!ComboBoxName
Keep in mind, if you're still a beginner, just be patient. These are advanced topics. CAN you do what you want to do? Sure. It's definitely possible. You just need to learn the right steps in order to get there. You're still on Beginner Level 6. This stuff is BEYOND Expert into Developer level material. Patience. No pun intended (See what I did there? Patients? Aha ha ha haha). No? Not funny? :(
Rajashree Natarajan 8 months ago
LMAO...thank you. I am obsessed with my database....SOMUCH TO LEARN....SO LITTLE TIME...LOL. Thank you for helping and supporting me.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.