I am trying to create a form that loads up text boxes with a number taken from a query. the code i am using is
Dim stDocName As String
stDocName = "Total Pages by Printer"
DoCmd.OpenQuery stDocName, acNormal, acEdit
Which opens my query. I then have to enter a date is dd/mm/yyyy format
then the code im using is
Prtr = DLookup("[Mailpieces]", "Total Pages by Printer", "[Printer]= CS1")
DoCmd.Close acQuery, "Total Pages by Printer", acSaveNo
But i keep having an error message appear saying that i have cancelled the previous operation. I have tried the code
without the close query code but the same error message appears.