Tabular form child-master

Haytham

Registered User.
Local time
Today, 23:41
Joined
Jun 27, 2001
Messages
162
Hi All...
I have a tabular form showing hundreeds of guest name records ordered alphabetically.
I have a unbound field to restrict the search by letters.
When open I want to show all the records.
When I write in UnBound Field: H , I should get the records started by H**** etc.. and if I write Ha it should filter accordingly.
If I do child - Master, when open tabular form no data diplayed.
How can I do so... hope my point is clear and hope someone can help me..
Thanks a lot
 
Use this as the WHERE clause: [TableName].[FieldName] Like '" & [UnboundField] & "*'"

Note the single quotes around the last part.

To take it off, use DoCmd.ShowAllRecords
 
Hi David R,
Thank you for reply. I think my bit knowledge needs more explanation.
I tried to apply the code in AfterUpdate of my txtUnbound field , but it gives mr error 438 object does not support this method.
I tried to go th' help of Where Clause but not succeded.
Still expecting more help.
 
Alright, here's the code I use to do something similar. Hopefully you can follow along and adapt it to your needs:

I have a separate form to do the searching. Behind the On Click event in my case, AfterUpdate in yours:
Code:
    Dim searchString As String
    
    searchString = "[LastName] Like '" & Me.LookupBox_LastName & "*'"

    DoCmd.ShowAllRecords
    DoCmd.OpenForm "FormName", , , searchString

Is that more clear?
David R
 

Users who are viewing this thread

Back
Top Bottom