In recent two days are just beginning to self-study access, made a query system,
I want to achieve in the query content does not exist, can pop-up msgbox asked whether to display all contents,
Msgbox function I have learned, also written into the query code, but the code does not actually realized, when the content of the query does not exist, only will display a blank,
Here is my query code about msgbox code, consult a great god how to correctly implement,
If DCount (" * ", "research and development department inventory", "shelves & amp; Shelves note & amp; Names Like '*' & amp; Keyword & amp; Me. "*")=0 Then
If MsgBox (" does not exist, whether to see all the goods?" , vbQuestion + vbOKCancel)=vbOK Then
Me. Child13. Form. RecordSource="SELECT * FROM research and development department inventory", "
End the If
End If