MsgBox

izen

Registered User.
Local time
Today, 19:01
Joined
Apr 2, 2009
Messages
50
I have the update query that display the items that need to be update
this qury are link to the form

I need this form show the Msgbox "No items need to be update" when there are not data in the update query.

Private Sub Form_Load()
If (qUpdateItem= Null) Then
MsgBox "No Ingredients to be updated", vbInformation, "Update Items"
Exit Sub
End If
End Sub

However qUpdateItem= Null << it doesnt work

u guys have any idea?

cheers
 
thanks but it doenst work
 
You can not bind and Action Query (Update) to a form! It can not be the RecordSource of the form; that needs to be a Select query.
 
sorry i dont understand
so any suggestion just want to show the user that there are not update items to be update
I dont want to just show the empty form to users

thanks
 
What is your form designed to accomplish?
just the form shows the query (qUpdateItem)

Thank you RuralGuy
I have got the way to check it

Private Sub Form_Load()
If DCount("*", "QueryName") = 0 Then
MsgBox "No items to be updated", vbInformation, "Update Items"
DoCmd.Close
Exit Sub
End If
End Sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom