edit, Records from a table based on combo

wickidwe

Registered User.
Local time
Today, 14:41
Joined
Dec 12, 2013
Messages
16
Hi I have a form to add, edit, and delete Records from a table
I am using the following VBA


Private Sub cmdEdit_Click()

If Not (Me.frmlEmpDetailsSub.Form.Recordset.EOF And Me.frmlEmpDetailsSub.Form.Recordset.BOF) Then
With Me.frmlEmpDetailsSub.Form.Recordset
Me.txtAddEditname = .Fields("Name")
Me.cboRoster = .Fields("Roster")
Me.cboPermFctn = .Fields("PermFctn")
End With
End If
End Sub

Instead of refering to the Subform to load the data i would like to refer to a combobox:

cboSearchName

I hope its not an issue but This Combobox contains 5 columns
 
No, this is not the same thing
all I need to do is change the recordset the the Edit fields refer to
 

Users who are viewing this thread

Back
Top Bottom