Hi. Im pre populating it from the same table. this is my code:
The table tblEndofDayTotal contains:
MyDate - Date/Time
DayTotal - Currency
TillTotal - Currency
Difference - Currency
Code:
Set db = CurrentDb
Set saveTotal = db.OpenRecordset("SELECT * FROM tblEndofDayTotal WHERE MyDate = " & Date)
Set endTotal = db.OpenRecordset("EndofDayTotal")
If saveTotal.RecordCount = 0 Then
txtTotal.Value = endTotal("SumOfPaid")
ElseIf saveTotal.RecordCount = 1 Then
txtTotal.Value = saveTotal("DateTotal")
txtTillTotal.Value = saveTotal("TillTotal")
txtDifference.Value = saveTotal("Difference")
txtTotal.Locked = True
txtTillTotal.Locked = True
txtDifference.Locked = True
btnCalculate.Enabled = False
btnSave.Enabled = False
End If
Any help?
Need to sort urgently and been stuck for quite a while??
Thanks..