newprogamer
Programmer
Hello, I have created an access database that receives the fields below from excel. What is the best way to retrieve and display this data to the user? For instance, if the user wants to search for all files with the same Quoter and Manufacturer. Thanks very much!
***************************
Private Sub WriteToDB(strQuoter, strInitials, strSequence, strManufacturer, strModel, strFileName)
'Receives data from cmdSaveSummary
'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("Quoter") = strQuoter
Rs("Initials") = strInitials
Rs("Sequence") = strSequence
Rs("Manufacturer") = strManufacturer
Rs("Model") = strModel
Rs("Name") = strFileName
.Update 'writes record to the database
End With
End Sub
***************************
Private Sub WriteToDB(strQuoter, strInitials, strSequence, strManufacturer, strModel, strFileName)
'Receives data from cmdSaveSummary
'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("Quoter") = strQuoter
Rs("Initials") = strInitials
Rs("Sequence") = strSequence
Rs("Manufacturer") = strManufacturer
Rs("Model") = strModel
Rs("Name") = strFileName
.Update 'writes record to the database
End With
End Sub