Take value from combo box do search and change value in table

oltroman

Registered User.
Local time
Today, 23:49
Joined
May 8, 2012
Messages
18
Hi,

I really am new to access and VBA :confused: I am using access 2007

I have a table "Inventory" consist of Name, Serial_No, Job_No
I have ff form on that Table and have combo box lookup to Serial_No of Inventory table and another combo box lookup to Job_No.

I have another table consist of Job_No which I link to Inventory Table.

I need to
1. Set Job_No combo box to a value of my choice (click and select)
2. Type Barcode data for my equipment into Barcode combo box (It will have suggestion since it will read from Barcode column)
3. Use the value in Barcode combo box to do search on Inventory table and if matched (the same Barcode) then change Job_No value in that line using Job_No value in combo box.

4. Button Next will execute all those codes.

Please help me out, been reading access 2007 book about 2 weeks now, still can't do this.
 

Attachments

Code:
Private Sub Command37_Click()

Dim dbContacts As DAO.Database
Dim rcd As DAO.Recordset

Set dbContacts = CurrentDb
Set rcd = _
    dbContacts.OpenRecordset("Inventory")
    rcd.FindFirst Table![Inventory]![Barcode] = "Combo40"
    
If Not rcd.NoMatch Then
    rcd.Edit
    rcd![Job_No] = Combo38
    rcd.Update
End If




MsgBox "Test"

End Sub
got error object require?
 

Users who are viewing this thread

Back
Top Bottom