Discussion Locked

Access2000: Data population in forms

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi guys,

How do I pass one form field to do a search/query in another table and display that field in another form on click of a button. (Data Duplication)

Scenario:

table1 fields:

ID = 1 (P.K)
Name: Romeo
Surname:Surname

Table2 fields:

ID = 1 (ref key)
salary = 1000
Dept = IT

And you have a form that displays name and surname and there's one button that when clicked displays the salary and department in another form for romeo mabasa.

Hope this makes sense...

Please help

3 replies

by eschlangen

The quick and easy answer is to base your secondary form on a query of Table 2 that includes a criteria that ID = Forms!Form1.Control1.Value where Control1 is bound to Table1.ID. When this second form is opened, the query will limit the data in it to those records with an ID that matches the control value in Form1, in this case only one record will be returned. I realize that this isn't as clear as I had hoped. If you still can't get this to work, email me.

This discussion is closed to new replies.