A family of Microsoft relational database management systems designed for ease of use.
You did not respond to question of how/what fields the tables are related.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I try to create macro, that after update some field of date in form that dependen in one table than compare in another table - field of date, and if less so up message box. It's looks some like this:
[table1]![date1] < [table2]![table2]
Message box
please chek the date
But when I try this, I get a error: "Microsoft access cannot find the name you entered in the expression" But I build it with expression builder!
Thank you
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
You did not respond to question of how/what fields the tables are related.
Thank you for answer,
Query not my way, I need to prevent incorrect entry.
So you suggest use DLookUp(), but how?
Thank for answer,
Table 1 main table and table 2 is related. Relationship: one to many. In table1, date 1 is final date. Unlike in table 2, date 2, can be some date.
I want to prevent incorrect entry. Query is not so good.
More information please. Is there any link between the two tables? If you're updating one record in Table1, how can you identify which record in Table2 should be used for the comparison? What are the relevant fields in your two tables, and how (if at all) are the tables related?
In any case, a Macro is probably not the right tool: you may be able to do this with a Query and if not, with some very easy VBA code.
Where are you needing to perform this comparison?
You might be able to use DLookUp() to get the value and compare them.
Another, preferred approach, is to build a query that extracts both values and then you can compare them directly to one another.