Question

Locked

Auto populate fields in Access Forms

By timothy_kramer ·
I have searched for answers on previous questions, but not sure I have what I need yet.

Here is my issue...I have a form to enter in PO's and what I am trying to do is pull in attribute data for a specific item to be displayed so the user does not have to enter the information in again. What I am trying to accomplish is pretty simple, but I cannot get the information to populate my fields. So here is what I have:

sfrmEnterPODetail is where the user enters in information like ItemNumber, QTY, and ReqShipDate. What I want to have happen is for the Desc1, Desc2, UOM, BoardLength and StdCost fields to be populated based on the item entered. My tblItemMaster table has all of these fields. The join is to my tblPODetail table based on ItemNumber. I tried to use a SELECT statement for the Control Source and the Row Source and neither worked. I also tried to create a Query and that is pulling in the attributes for only 1 item, meaning that the first item entered brings in the right attributes, but all other items use those same attributes, which is incorrect.

I hope this is something that someone can help out with rather quickly. Thanks in advance!

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Tools menu

by Absolutely In reply to Auto populate fields in A ...

Tools\Relationships

An Insert or Update statement could work too, but defining relationships is a simpler way of getting the other field to auto-populate. Create a separate table, with all the items and all the fields you need to be auto-populated to correspond to those items. Now go to the Tools menu, select Relationships, and take it from here.

Collapse -

Auto populate fields in Access Forms

by timothy_kramer In reply to Tools menu

So would this table that you suggest be a cross reference table? I have both tables in the relationship diagram based on the ItemNumber field so I am not sure how this would work to add another table. I am pretty new to Access to perhaps I am just not seeing your answer clearly.

Collapse -

DLOOKUP

by timothy_kramer In reply to Auto populate fields in A ...

I ended up using the dlookup in the Control Source of the field and it works perfectly. Thanks!

Back to Web Development Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums