beginner
08-08-2005, 01:39 PM
hi all helpers....
i got a headache to display selected records in a subform based on selected comboBox's [BADGE_ID] and a Text's [DATE]
1. the mainForm sourced from a table while the subForm sourced from SQL of the same table.
2. have linked Master & Child the mainForm and subForm with [BADGE_NO]
i notice its quite common people use below coding for recordset FindFirst matching...(for single field matching), and it work fine.
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''
Set rs = Me.Recordset.Clone
rs.FindFirst "[BADGE_NO] = '" & Me![Combo_BADGE_NO] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''
but for the above "re.FindFirst...." what i need is something similar to below:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''
rs.FindFirst "[BADGE_NO] = '" & Me![Combo_BADGE_NO] & "'" And "[DATE] ='" & Me![Txt_date] & "'"
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''
however, the above "single line" code got error,
would anyone can help how to achieve recordset FindFirst method to base on two field matching ??
thanks in advanced. http://www.theofficeexperts.com/forum/images/smilies/crap.gif:help
i got a headache to display selected records in a subform based on selected comboBox's [BADGE_ID] and a Text's [DATE]
1. the mainForm sourced from a table while the subForm sourced from SQL of the same table.
2. have linked Master & Child the mainForm and subForm with [BADGE_NO]
i notice its quite common people use below coding for recordset FindFirst matching...(for single field matching), and it work fine.
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''
Set rs = Me.Recordset.Clone
rs.FindFirst "[BADGE_NO] = '" & Me![Combo_BADGE_NO] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''
but for the above "re.FindFirst...." what i need is something similar to below:
'''''''''''''''''''''''''''''''''''''''''''''''''' '''''''''
rs.FindFirst "[BADGE_NO] = '" & Me![Combo_BADGE_NO] & "'" And "[DATE] ='" & Me![Txt_date] & "'"
'''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''
however, the above "single line" code got error,
would anyone can help how to achieve recordset FindFirst method to base on two field matching ??
thanks in advanced. http://www.theofficeexperts.com/forum/images/smilies/crap.gif:help