AHMED KHALAF
Registered User.
- Local time
- Yesterday, 16:35
- Joined
- Feb 13, 2008
- Messages
- 20
Forms!FormName!ComboName
You can use the contents of your combo boxes as criteria in a query try;
Code:Forms!FormName!ComboName
FormName will be the name of your form f_unique
ComboName will be the name of the combo and should relate to field it is the criteria for.
[Forms]![F_UNIQUE]![CO_PROJECT].[VALUE]
[Forms]![F_UNIQUE]![CO_filter]
I do not know how to find matching value from unbound combo box to bound combo box.
Private Sub Command33_Click()
Me.CO_REQUISITION = Me.CO_FILTER
End Sub
One simple answer to your question is:
Code:Private Sub Command33_Click() Me.CO_REQUISITION = Me.CO_FILTER End Sub
JR
The problem here is that your combobox CO_Requistion is bound to a query which is NOT Updateble, so you cannot set a value to this field. Make the query updateble before you move on.
JR
Private Sub Command40_Click()
Dim strCustomerRef As String
Dim strSearch As String
If IsNull(Me![CO_FILTER]) Or (Me![CO_FILTER]) = "" Then
MsgBox "Please enter a value!", vbOKOnly, "Invalid Search Criterion!"
Me![CO_FILTER].SetFocus
Exit Sub
End If
DoCmd.ShowAllRecords
DoCmd.GoToControl ("CO_REQUISITION")
DoCmd.FindRecord Me.CO_FILTER
CO_REQUISITION.SetFocus
strCustomerRef = CO_REQUISITION
CO_FILTER.SetFocus
strSearch = CO_FILTERH
If strCustomerRef = strSearch Then
CO_REQUISITION.SetFocus
CO_FILTER = CO_FILTER
End If
End Sub
check to see if now is working.