condition for a check box in a macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a database that forwards reports to various individuals via
Lotus Notes Mail. It would work with any mail client. Now, once that user
receives the report through the email, I have inserted a hyperlink so that
when they click they go directly to the database. There will be security on
this database so that certain users can only open certain forms. I have gone
so far as to make it so that when the user of a certain group enters a report
number, a specific form should pop up based on the membership within that
group.

So I have created a AutoExec macro that runs a macro to open a dialog box.
The user enters a Transmittal number in the dialog box. I have a query that
runs that searches for that record based on the number entered and chooses
the record. Then the form should open up with that record but it has to be
the right form. So the form opening criteria is if Lead check box is yes and
the Test check box is no, then open the App Lead Form. If the Test check box
is yes and the Arch check box is no then open the Test form...and so on. I
am putting this in the condition column in the Auto Exec macro but it doesn't
seem to recognize what to do.

Example:


Condition:
[Forms]![Transmittal Form]![SubmitApprLead]=Yes and [Forms]![Transmittal
Form]![SubmitApprTest]=no

Action:
OpenForm (I specify the form that should be opened in the area below the
macro design).

All works fine except it will open the form and have the correct record even
if the criteria is not met. I hope this is not too much to understand.

PLEASE HELP

gettingbetterataccess
 
Rob,

The AutoExec macro is the wrong place for this. The Transmittal Form is
not open at the time that the AutoExec runs, so the value of the
SubmitApprLead etc have no meaning. I haven't got a clear enough
overview of where the Transmittal Form fits in to give specific advice,
but I think you will need to use another event for your maco.
 
Thanks Steve:

Actually, I left out the part about the Transmittal Form and I have it open
within the macro. And, I have it working now. Thanks anyway,

Rob

Steve Schapel said:
Rob,

The AutoExec macro is the wrong place for this. The Transmittal Form is
not open at the time that the AutoExec runs, so the value of the
SubmitApprLead etc have no meaning. I haven't got a clear enough
overview of where the Transmittal Form fits in to give specific advice,
but I think you will need to use another event for your maco.

--
Steve Schapel, Microsoft Access MVP
I have created a database that forwards reports to various individuals via
Lotus Notes Mail. It would work with any mail client. Now, once that user
receives the report through the email, I have inserted a hyperlink so that
when they click they go directly to the database. There will be security on
this database so that certain users can only open certain forms. I have gone
so far as to make it so that when the user of a certain group enters a report
number, a specific form should pop up based on the membership within that
group.

So I have created a AutoExec macro that runs a macro to open a dialog box.
The user enters a Transmittal number in the dialog box. I have a query that
runs that searches for that record based on the number entered and chooses
the record. Then the form should open up with that record but it has to be
the right form. So the form opening criteria is if Lead check box is yes and
the Test check box is no, then open the App Lead Form. If the Test check box
is yes and the Arch check box is no then open the Test form...and so on. I
am putting this in the condition column in the Auto Exec macro but it doesn't
seem to recognize what to do.

Example:


Condition:
[Forms]![Transmittal Form]![SubmitApprLead]=Yes and [Forms]![Transmittal
Form]![SubmitApprTest]=no

Action:
OpenForm (I specify the form that should be opened in the area below the
macro design).

All works fine except it will open the form and have the correct record even
if the criteria is not met. I hope this is not too much to understand.

PLEASE HELP

gettingbetterataccess
 
Back
Top