By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,135 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

populating a form automatically with a button

P: 12
I have 2 tables , Production table and the Total table. The production table is made from a form and the total table just has data in it. I need to populate 2 fields from the total table into the production table. They both have a common field being the Vial #. Sometimes there are 2 identical vial # for a product but they are packed on a different line. I need the line speeds the lines would run at and the # of people per line which is all stored in the Total table.
I put a button to run a query which will give me this info. I was wondering is there is a way of me automatically putting in the information ie . # of people and line speed from the total table into the respective fields within the form when the button is pressed. AGain the Vial # isnt unique but if i run a query with the vial # and the line # , i would get exact values which i could copy into my form. Is there a way of automatically putting it into the form as soon as i type the Vial # and the line # in the form by pressing the button?
I looked at the command button options and couldnt find anything.

Kindly help!
Oct 26 '06 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
I have 2 tables , Production table and the Total table. The production table is made from a form and the total table just has data in it. I need to populate 2 fields from the total table into the production table. They both have a common field being the Vial #. Sometimes there are 2 identical vial # for a product but they are packed on a different line. I need the line speeds the lines would run at and the # of people per line which is all stored in the Total table.
I put a button to run a query which will give me this info. I was wondering is there is a way of me automatically putting in the information ie . # of people and line speed from the total table into the respective fields within the form when the button is pressed. AGain the Vial # isnt unique but if i run a query with the vial # and the line # , i would get exact values which i could copy into my form. Is there a way of automatically putting it into the form as soon as i type the Vial # and the line # in the form by pressing the button?
I looked at the command button options and couldnt find anything.

Kindly help!
Try using something in the button on click event like

Me.[Control Name for Vial#] = Dlookup("[Vial#]","Total","[Line#]=" & Me.[some value on form]
Oct 27 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.