I have a Main Form with 3 SubForms.
What I am trying to do is to convert a lookup combobox to use a query.
This is back ended to MS SQL 2k currently.
MainActivity
AddNewCace UpdateCase AddUpdateCustContacts
On AddnewCase and UpdateCase there is a lookup from the TblContacts that consists of a ComboBox drop down that the data source is a query (QryContactsLookup) That is sorted by ContactName and only shows the the ContactName in the drop down.
This is what it is now.
Can I autofill the 4 fields using the query and combo box without the column referrences?
Thanks
John Fuhrman
faq329-6766
faq329-7301
thread329-1334328
thread329-1424438
What I am trying to do is to convert a lookup combobox to use a query.
This is back ended to MS SQL 2k currently.
MainActivity
AddNewCace UpdateCase AddUpdateCustContacts
On AddnewCase and UpdateCase there is a lookup from the TblContacts that consists of a ComboBox drop down that the data source is a query (QryContactsLookup) That is sorted by ContactName and only shows the the ContactName in the drop down.
Code:
Private Sub ContactAll_Click()
' Me[ContactName] = QryContactsLookup.Fields("tblContactName")
Me![ContactPhone] = QryContactsLookup.Fields("tblContactPhone")
Me![ContactFax] = QryContactsLookup.Fields("tblContactFax")
Me![OfficeCode] = QryContactsLookup.Fields("tblOfficeCode")
Me![ProgramName] = QryContactsLookup.Fields("tblProgram")
End Sub
This is what it is now.
Code:
Private Sub ContactAll_Click()
Me![ContactName] = [ContactAll].[Column](1)
Me![ContactPhone] = [ContactAll].[Column](2)
Me![ContactFax] = [ContactAll].[Column](3)
Me![OfficeCode] = [ContactAll].[Column](4)
Me![ProgramName] = [ContactAll].[Column](5)
End Sub
Can I autofill the 4 fields using the query and combo box without the column referrences?
Thanks
John Fuhrman
faq329-6766
faq329-7301
thread329-1334328
thread329-1424438