944,164 Members | Top Members by Rank

Ad:
Sep 19th, 2007
0

It shouldn't be this hard

Expand Post »
Should be simple but my brain is about to explode. My database has a form frmPets. I am simply trying to take a field (text) from that form and populate other related forms without actually having to open those forms right away. After 2 weeks of searching and banging my head against the keyboard I'm about to go starkers!

I followed Stan Yost's thread but no result for me.

frmPets
type in the pet's name in the PetName text box.

frmPrescription
take the previously entered PetName from frmPets and display it on this form in a text box.

frmConsult
take the previously entered PetName from frmPets and display it on this form in a text box.

I don't want to add a cmd button to open and populate the new forms. I need to have the forms populated when the user opens them.

By the way - I am so new at MS Access and coding that you can still smell that new software scent on me Thanks for any help you may be able to give me!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
blinkonon is offline Offline
1 posts
since Sep 2007
Sep 20th, 2007
0

Re: It shouldn't be this hard

Hi,

You have to create a module, and in that module declare a public variable (ex: Public PetNam as string). Now in frmPet and on the textbox after update event (or change event) add the following code:
PetNam = Me.txtPetNam (where txtPetNam is the text box in which the name is filled).
Now on the other form open event add the below code:
Me.txtPet = PetNam (where txtPet is the name of the text box in frmPrescription).
Reputation Points: 13
Solved Threads: 29
Junior Poster
kb.net is offline Offline
169 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: How to incorporate crystal report in vb6
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Find Similars?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC