Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

retrieve data from an access database

Status
Not open for further replies.

newprogamer

Programmer
Sep 22, 2004
107
US
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
 
do some search for (b]query by form[/b]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top