POP-UP Form based on if then statement

denileigh

Registered User.
Local time
Today, 21:28
Joined
Dec 9, 2003
Messages
212
Hello all,

I searched around the forums and couldn't find what I was looking for. I need a pop-up form that is based on an if then statement.

For example if there is a certain customer selected on the form and the detailed bill is more than 10 lines long (I have a count field) then I need a box to pop-up that says....

REMINDER: You will need to manually reformat this 500byte file.

I also need another one that pops-up when the record loads that warns if a purchase order field is blank.

Thanks for the help!
Dianne
 
So basically you would write some VBA for your form that would kick off after a customer is selected on the form control using the control's AfterUpdate event, for one example.

The code would be something like

Code:
If Me.CustomerFormControl.Value = "CertainCustomer" AND
Me.CountFieldFormControl.Value > 10 then 
MsgBox "REMINDER: You will need to manually reformat this 500byte file."
End if


This assumes the "count field" is on the same form.
I could be wrong on the ".Value", but I think that's correct. Just trying to get you headed in the right direction.

MsgBox has a lot more functionality than that, so I would recommend researching various ways to display messages.
 
Thank you!
 
This isn't working...

Private Sub Form_AfterUpdate()
If Me.Customer.Value = "GATX (Chicago-Physical)" Then
MsgBox "REMINDER: You will need to manually reformat this 500byte file."
End If
End Sub

I need two pop-up boxes...one for the line count and one just for the customer.
 

Users who are viewing this thread

Back
Top Bottom