newprogamer
Programmer
Hello, I have the following code writing to an access database. I would like the users to be able to search on different criteria (for example model number , maufacturer,etc.) to retrieve the data. Does anyone know the best way to retrieve the data. Any help would be appreciated.
*********************
'Write Filename to access database
Dim db As Database
Dim Rs As Recordset
Set db = OpenDatabase("C:\Quotes\quoteDB.mdb")
' open the database
Set Rs = db.OpenRecordset("FileName", dbOpenTable)
With Rs
.AddNew 'create a new record into the database
' add values to each field in the record
Rs("QuotedBy") = strInitials
Rs("Sequence") = strSequence
Rs("Manufacturer") = strManufacturer
Rs("Model") = strModel
Rs("Name") = strFileName
.Update 'writes record to the database
End With
End Sub
*********************
'Write Filename to access database
Dim db As Database
Dim Rs As Recordset
Set db = OpenDatabase("C:\Quotes\quoteDB.mdb")
' open the database
Set Rs = db.OpenRecordset("FileName", dbOpenTable)
With Rs
.AddNew 'create a new record into the database
' add values to each field in the record
Rs("QuotedBy") = strInitials
Rs("Sequence") = strSequence
Rs("Manufacturer") = strManufacturer
Rs("Model") = strModel
Rs("Name") = strFileName
.Update 'writes record to the database
End With
End Sub