I have been trying to fix this for months now but cannot see what he problem is. Like I say it works perfectly until I make the exe file and run that. The section of code which I think is responsible is as follows:
Expand|Select|Wrap|Line Numbers
- Sub CashUp_Click()
- isoutofstock = False
- For n = 1 To MSFlexGrid2.Rows - 1
- If ProdDetails(n).ProdStock = 0 Then isoutofstock = True
- Next
- If isoutofstock Then Call POrderRaise
- If POraised And MSFlexGrid2.Rows = 1 Then Cancel_Click: Exit Sub
- nextReceiptNumber = GetNextNo(1)
- Set pdb = OpenDatabase(dbName)
- Set p_rec = pdb.OpenRecordset("TillReceipts")
- ...