Good evening to all,
Guys I'm stuck on an issue that I am sure for many of you it may seem slightly " deaf " but unfortunately either my mind is stuck or....i don't know whats happened.
Well , I have written the below vba code so that, firstly to run the first without any messages and then the second one as well as without the access messages.
The problem is while I've written correct the code ( I think ) so to run the queries messages without the access messages, however the messages still displayed and indeed the first query displayed normal..
Following, is the code and i will appreciated if i would have your lights again
Private Sub LabelNewCustomers_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryTransferCmrDetails2", acViewNormal
DoCmd.SetWarnings True
DoCmd.RunCommand acCmdRefresh
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryTransferData2", acViewNormal
DoCmd.SetWarnings True
DoCmd.OpenForm "fTempTable", acNormal, , , , acHidden
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmCustomerDetails"
stLinkCriteria = "[Customer No]=" & Me![Customer No]
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec
End Sub
Thanks in advanced