Access qbf no records

Joined
Sep 5, 2008
Messages
2
Reaction score
0
Hi- I have worked in MS Access for many years and I have 1 frustrating problem(for the moment)
the Query for a form goes like this :SELECT DISTINCTROW STOCK.JOBNO, STOCK.quant, STOCK.FINISH, FROM vendors INNER JOIN STOCK ON vendors.vendorid = STOCK.vendorid
WHERE (((STOCK.NAME) Is Not Null) AND ((STOCK.JOBNO)=[Type a Job Number])); SO.. you type in a jobnumber. If the jobnumber matches, you see the result. If the jobnumber does not match, a blank form comes up (Access 2007). I used this code in Access 2000 "On Current" and it works fine:

If IsNull(Me![quant]) Then
MsgBox " No Stock has Been Specifically Ordered for This Job"
[Button65].SetFocus ' This IS the "Close" button
SendKeys "{ENTER}"
Close
Exit Sub
End If

This effectively closes the form and the will allow you to try again. Does anyone know why this doesn't work in Access 2007?

Many thanks
Andy
 
Back
Top