Create a Macro to check ID

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
 
S

Steve Schapel

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.)
 
T

tony wong

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top