Y
ye
Hi,
I build a subform in a main form. This subform will show
all records according to query. This query is created in
VB because it is a dynamic query (that is, query is
created according to one of field that user inputs in the
main form).
For example,
There is a text control called "textFirstName" and a
subform called "child".
VB code:
dim FirstName As String
FirstName = Me![textFirstName]
qry = "SELECT * FROM CorporateTable WHERE " & SearchBy
& " = """ & FirstName & """"
Me![child].SourceObject = qry
The last sentence doesn't work.
I don't know how to link query with subform in VB. Please
help me if anybody knows how to do it.
thanks.
I build a subform in a main form. This subform will show
all records according to query. This query is created in
VB because it is a dynamic query (that is, query is
created according to one of field that user inputs in the
main form).
For example,
There is a text control called "textFirstName" and a
subform called "child".
VB code:
dim FirstName As String
FirstName = Me![textFirstName]
qry = "SELECT * FROM CorporateTable WHERE " & SearchBy
& " = """ & FirstName & """"
Me![child].SourceObject = qry
The last sentence doesn't work.
I don't know how to link query with subform in VB. Please
help me if anybody knows how to do it.
thanks.