G
Guest
Hi guys,
I have attempted this procedure before, but I cannot figure out why it is
not working this time. I am trying to use DAO to find a record in a table
(not by primary key) then edit it. First I was getting "update without edit"
even though the edit was indeed there , or I get wrong type if I use the
wrong dbopen mode in OpenRecordset or I get EOF if I user findFirst even
though I know the record exists.
This what I have:
Dim invRS As DAO.Recordset
Set invRS = CurrentDb.OpenRecordset("INVOICE", dbOpenDynamic)
With invRS
If ....(New record functions)
Else
.FindFirst "RefNumber = '10129'"
If .EOF Then
MsgBox ("No Invoice by that ID.")
Exit Function
Else
.Edit
..Update
I have tried numerous ways, but cant figure out why nothing is working.
Any assistance would be great.
Cheers,
David
I have attempted this procedure before, but I cannot figure out why it is
not working this time. I am trying to use DAO to find a record in a table
(not by primary key) then edit it. First I was getting "update without edit"
even though the edit was indeed there , or I get wrong type if I use the
wrong dbopen mode in OpenRecordset or I get EOF if I user findFirst even
though I know the record exists.
This what I have:
Dim invRS As DAO.Recordset
Set invRS = CurrentDb.OpenRecordset("INVOICE", dbOpenDynamic)
With invRS
If ....(New record functions)
Else
.FindFirst "RefNumber = '10129'"
If .EOF Then
MsgBox ("No Invoice by that ID.")
Exit Function
Else
.Edit
..Update
I have tried numerous ways, but cant figure out why nothing is working.
Any assistance would be great.
Cheers,
David