469,926 Members | 1,571 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,926 developers. It's quick & easy.

Auto fill a form

20
I didn't see a search feature in these forums, so I couldn't look up this question and I am sure it is a common questions.

I am trying to auto fill some information on an form. Here is what I have going on. I created a form that will fill in information on one table, but I also want information from another table on this form, but I want this infomation to automatically fill in was soon as I type lets say a part number. I tried to do this by placing both tables in a query and making a relationship between the two tables. But when I put the part number in, none of the information on that part number that I want on the form from the one table does not come up. How do I get this information onto the form

Thanks
Jan 16 '08 #1
3 2817
jaxjagfan
254 Expert 100+
I didn't see a search feature in these forums, so I couldn't look up this question and I am sure it is a common questions.

I am trying to auto fill some information on an form. Here is what I have going on. I created a form that will fill in information on one table, but I also want information from another table on this form, but I want this infomation to automatically fill in was soon as I type lets say a part number. I tried to do this by placing both tables in a query and making a relationship between the two tables. But when I put the part number in, none of the information on that part number that I want on the form from the one table does not come up. How do I get this information onto the form

Thanks
This would be easy to do with a combobox. Make a combobox - its rowsource would be your parts table. Link it to the PartNumber field on the form (if you have one) List the partnumber 1st and include all of the other fields of data you want to use in the "autofill". Set the number of columns to the number of fields you have included. Set all of the column widths to 0 except the 1st column (make it wide enough to accomodate the widest possible part number).

On the AfterUpdate Property of the combo

Me.txtPartName = me.cboPartNbr.Column(1)
Me.txtPartSupplier = me.cboPartNbr.Column(2)
Me.txtPartCost = me.cboPartNbr.Column(3)
...

The combo references its 1st column as 0 - the partnumber - me.cboPartNbr.column(0) or just me.cboPartNbr
Jan 16 '08 #2
Steve67
20
Thanks for looking at my problem and posting a suggestion. We have hundreds of part numbers, so the idea of making a combo box is something I was trying to stay away from. Would be a pain in the butt to scoll through all the part numbers to find the one you wanted. I was happing to be able to just type the part number in and import the information from the one table on to the form created by another table. I might have to use a subform.
Jan 17 '08 #3
missinglinq
3,532 Expert 2GB
If the AutoExpand Property is set to Yes (the Default) when your users start to type in the parts number Access will zip them thru the numbers to the correct one.

The search box for the forum is at the top to the right of theScripts logo. It's the box that says "Search" in it!

Welcome to TheScripts!

Linq ;0)>
Jan 18 '08 #4

Post your reply

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

Similar topics

1 post views Thread by Maurice Mertens | last post: by
2 posts views Thread by Joanne Lewis | last post: by
1 post views Thread by Benny | last post: by
1 post views Thread by qwas2123 | last post: by
10 posts views Thread by Charles Richmond | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.