Macro print IF statement problem

voidcranium

Registered Something.
Local time
Today, 00:21
Joined
Oct 29, 2006
Messages
175
Hello all, I have a question/problem and I need your expert advice/wisdom.

I have a program that prints out Work Orders. The original person who set all this up made a MACRO to do this. (See image)

I need this print command to access an if statement and IF TRUE I need it to print another report.

I don't know how to get an IF statement in the Original MACRO.

Got any ideas?

Thanks


printmacro.jpg
 
If you want to stay with macros, you can click on View/Conditions which will give you an extra column, where you can add the test. Or you can use this as the opportunity to switch to VBA and use an If/Then block.
 
If you want to stay with macros, you can click on View/Conditions which will give you an extra column, where you can add the test. Or you can use this as the opportunity to switch to VBA and use an If/Then block.

I am going to have to try the VBA part because I am getting nowhere with the macro thing.

I would rather do it with VBA but this print macro is set up different than my other print buttons.

This part is what I am not sure what to do about.
[Forms]![frmInitiateWorkOrder]![Id]=[tblMainTable]![Id]
This is what the macro is using.

I tried just creating a new print button but it started printing all the records in the database.
 
I just happened to get the macro thing to work.

I was trying to do to much with the condition statement.

Here is what I ended up doing.

Under the Condition column I just used this:
cboFlexo=True

I was trying to make an IF THEN statement but all I had to do is enter that code. This is the first time I have ever tried to make changes to a macro so I have learned something new.


Thanks for your help.
 
Happy to help, and thanks for the compliment. I'm trying to create a useful site.
 

Users who are viewing this thread

Back
Top Bottom