Microsoft
Software
Hardware
Network
Question : How can I return an error message when a field or control is Blank
Hi experts
I am currently designing an Access form that produces a purchase order, I have a button on the form which opens a report for printing.
I want to make the report refuse to open if the operator hasn't selected their name in the "ordered by" combo box the data source for that control is a value list (of names)
I would be grateful for any help as I have spent too long trying to code it already!
Access 2007
Answer : How can I return an error message when a field or control is Blank
Hello Tintoman51,
Put a snippet like this into the Click event sub for that button:
If Nz(Me!OrderedBy, "") = "" Then
MsgBox "You must select a name to order by", vbCritical, "Invalid Entry"
Me.OrderedBy.SetFocus
Exit Sub
End If
Regards,
Patrick
Random Solutions
Reboot Networked Computer
Get autonumber ( unique ID ) of newly inserted record, then insert value into a relating table, ms access 2003
cannot access win xp system in workgroup
In MS Access 2003 - how do I import scanned images easily into record?
BSOD 0X40000080
RDP Problem on Windows 2008 Web Edition.
I want to be able to access my internally hosted website using the domain name
The server tag is not well formed
SSRS 2008 rsAccessDenied on reportserver
MSSQL query count te values of te outut from te subquerys