value from another table (1 Viewer)

kitty77

Registered User.
Local time
Today, 13:29
Joined
May 27, 2019
Messages
712
I have a form that I would like to click a command button and have the value of a field (in another table) pasted into the field.

if two other fields are equal.

Not sure how to do this. Thinking a dlookup for starters.

Hope I'm being clear enough...

Thanks.
 

jdraw

Super Moderator
Staff member
Local time
Today, 13:29
Joined
Jan 23, 2006
Messages
15,379
Sounds reasonable, but it would help if you could tell us more about your database and the tables/fields involved.
 

kitty77

Registered User.
Local time
Today, 13:29
Joined
May 27, 2019
Messages
712
Ok, the form is called main based on a table called master.
The field where I want the data pasted is called results.
Bothe tables have a field called sampleid
The table where I want the data to come from is called values
And the field is results
 

theDBguy

I’m here to help
Staff member
Local time
Today, 10:29
Joined
Oct 29, 2018
Messages
21,469
Hi. If something is already stored in a table, it's usually not necessary to store it again in another table. What exactly are you trying to accomplish?
 

kitty77

Registered User.
Local time
Today, 13:29
Joined
May 27, 2019
Messages
712
I'm trying to get that value from another table into my form based on a value in a field. So, if the value exists in both table, then get the info from a field and paste it in.
 

jdraw

Super Moderator
Staff member
Local time
Today, 13:29
Joined
Jan 23, 2006
Messages
15,379
I agree with theDBguy that you seem to have 2 tables with the same fields and data--usually a sign of a structure problem.

I did mock up(based on my understanding ) your tables and a form with a button. But we should know more about your "business" to ensure your structures match your requirement.

Good luck with your project.
 

Attachments

  • AWF.accdb
    524 KB · Views: 66

Users who are viewing this thread

Top Bottom