Create a Macro to check ID

  • Thread starter Thread starter tony wong
  • Start date Start date
T

tony wong

i wish to create a macro to check the integrity of database, like that

if max(TableA.ID) <> max(TableB.ID) then
msgbox("ID not matched")

How can i make it in macro look?

Thanks a lot.

Tony
 
Tony,

You can make a macro with the MsgBox action.

In the Condition of the macro, you can enter the equivalent of this:

DMax("[ID]","TableA")<>DMax("[ID]","TableB")

(If you don't see the Condition column in the macro design window,
select it from the View menu.)
 
Thanks a lot. Steve


Steve Schapel said:
Tony,

You can make a macro with the MsgBox action.

In the Condition of the macro, you can enter the equivalent of this:

DMax("[ID]","TableA")<>DMax("[ID]","TableB")

(If you don't see the Condition column in the macro design window, select
it from the View menu.)

--
Steve Schapel, Microsoft Access MVP

tony said:
i wish to create a macro to check the integrity of database, like that

if max(TableA.ID) <> max(TableB.ID) then
msgbox("ID not matched")

How can i make it in macro look?

Thanks a lot.

Tony
 
Back
Top