N
noodnutt
G'day all,
I originally did this DB in Acc97, and the following code works fine, I then
converted it to Acc2000.
Now all it does is updates the first recordID (no. 1) in the table instead
of the recordID (eg 212) that is visible when I execute the code.
Private Sub Titlecbo_AfterUpdate()
Dim dbMyDB As Database, rsMyRS As Recordset, intresponse As Integer
Set dbMyDB = CurrentDb
Set rsMyRS = dbMyDB.OpenRecordset("tblDVDList", dbOpenDynaset)**
rsMyRS.Edit
rsMyRS("Location") = 1
intresponse = MsgBox("You are about to loan this DVD Title out! - Are
You Sure???", vbYesNo)
If intresponse = vbYes Then
rsMyRS.Update
Me.Titlecbo.Requery
Else
rsMyRS.CancelUpdate
rsMyRS.Close
dbMyDB.Close
End If
End Sub
** I even changed this section to the following, but it didn't work either:
Set rsMyRS = dbMyDB.OpenRecordset("tblDVDList", "DVDTitleID =
Me.DVDTitleID")
Any & all suggestions greatfully recieved.
TIA
Mark.
I originally did this DB in Acc97, and the following code works fine, I then
converted it to Acc2000.
Now all it does is updates the first recordID (no. 1) in the table instead
of the recordID (eg 212) that is visible when I execute the code.
Private Sub Titlecbo_AfterUpdate()
Dim dbMyDB As Database, rsMyRS As Recordset, intresponse As Integer
Set dbMyDB = CurrentDb
Set rsMyRS = dbMyDB.OpenRecordset("tblDVDList", dbOpenDynaset)**
rsMyRS.Edit
rsMyRS("Location") = 1
intresponse = MsgBox("You are about to loan this DVD Title out! - Are
You Sure???", vbYesNo)
If intresponse = vbYes Then
rsMyRS.Update
Me.Titlecbo.Requery
Else
rsMyRS.CancelUpdate
rsMyRS.Close
dbMyDB.Close
End If
End Sub
** I even changed this section to the following, but it didn't work either:
Set rsMyRS = dbMyDB.OpenRecordset("tblDVDList", "DVDTitleID =
Me.DVDTitleID")
Any & all suggestions greatfully recieved.
TIA
Mark.