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!

Programmatically updating field in another table

Status
Not open for further replies.

cmaceHWI

MIS
Dec 21, 2006
5
US
I have two tables in my database, each table has a field named "Export". Each field is a checkbox. Is it possible that when I check the field in the first table it will update the field in the second table? I was thinking along the lines of placing code in the After Update event that went something like this

if [1st table]!export.value = True
then [2nd table].export.value = true
else
[2nd table].export.value = false
end if

this did not work. Does anyone know the correct way to code this or another way to achieve this?
 
I would expect each table had more than one record. You haven't provided any indication of which record in the 1st table should influence which record in the 2nd table.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
and is there a valid reason for breaking the rules of normalization and storing the same piece of information in two different places? (not saying that you don't, I just always ask!)

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for database developers:
The Fundamentals of Relational Database Design
Understanding SQL Joins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top