Hi All,
I am trying to write code that can execute an id satement between 2 variables?????
please can anyone help?...any help most appreciated
function update()
Dim db As Database
Dim rec As Recordset
Set db = CurrentDb
Set rec = db.OpenRecordset("Table1")
Dim lot1 As Integer
Dim lot2 As Integer
Dim sd1 As Date
lot1 = [Text16].Value
lot2 = [Text17].Value
sd1 = [Text14].Value
Do While Not rec.EOF
rec.Edit
If rec("Lot no").value is between lot1 AND lot2 then ' this is where i am lost
rec("Date") = sd1
end if
rec.update
rec.MoveNext
Loop
update = True
End Function
