FireViking
Programmer
Hi all,
I am trying to access a table at run time through code to change the value of certain feilds.
The form at run time is bound to table 'A', I have a listbox on the form that is populated from a query of Table 'B'. Once the user clicks an item in the listbox I want to change the value of a feild in Table 'B' so that it does'nt show in the listbox anymore.
The code is written in the click event of the listbox
Dim db As Database
Dim rs As Recordset
Dim intBookID As Integer
intBookID = ListBox.Value 'ID number of the book
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * from tblBooks where BookID = " & intBookID)
rs("Issued"
= False
rs.Close
db.Close
for some reason i keep getting a mismatch error while tring to set the recordset.
Can someone give some ideas.
I am trying to access a table at run time through code to change the value of certain feilds.
The form at run time is bound to table 'A', I have a listbox on the form that is populated from a query of Table 'B'. Once the user clicks an item in the listbox I want to change the value of a feild in Table 'B' so that it does'nt show in the listbox anymore.
The code is written in the click event of the listbox
Dim db As Database
Dim rs As Recordset
Dim intBookID As Integer
intBookID = ListBox.Value 'ID number of the book
Set db = CurrentDb
Set rs = db.OpenRecordset("Select * from tblBooks where BookID = " & intBookID)
rs("Issued"
rs.Close
db.Close
for some reason i keep getting a mismatch error while tring to set the recordset.
Can someone give some ideas.