Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add new record to query containing lookup data

Status
Not open for further replies.

vomo

Technical User
Apr 7, 2003
3
FR
I hope someone can help me. Please see below.

EMP Table LOC Table
ID EMPID EMP LOCID LOCATION
1 1 SALES REP1 1 LOC1
2 1 SALES REP1 2 LOC2
3 1 SALES REP1 3 LOC3
4 2 SALES REP2 4 LOC4
5 2 SALES REP2 5 LOC5
The EMP and LOC tables were joined to give Query1, whereby LOC.EMP is selected by using combo/lookup query. I have selected DISTINCTROW EMP from EMP table and input it as a lookup query into LOC table
Query1
EMP.ID EMP.EMPID LOC.EMP LOC.LOCID LOC.LOCATION
1 1 SALES REP1 1 LOC1
2 1 SALES REP1 2 LOC2
3 1 SALES REP1 3 LOC3
4 2 SALES REP2 4 LOC4
5 2 SALES REP2 5 LOC5

Using the query as the recordsource for a form, I want to use a command button (with on-click event) to add a new LOCATION to my query/data whilst on a current EMPID record
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top