How can I set two Record Source to a Form? Thanks

V

Van T. Dinh

A Form can only have ONE RecordSource.

You need to combine what ever you need by using one QUERY and then set this
Query as the RecordSource for your Form.

Describe you set-up, the source Tables and what you need as the RecordSource
for the Form ...
 
G

gdct

For exmple:
I want to use Labelview(TM) to print a label (Barcode). Table1 contains two
fields: "Barcode", "Filename". Tabel2 contains two fields: "Item", "String".
When I call Labelview to print a label, I write VBA code as

If Lbl Is Nothing Then
Set Lbl = CreateObject("Lblvw.Document")
If logged = False Then
logged = Lbl.LogonWindow
End If
End If
Dim RetV As Boolean

RetV = Lbl.Open(Table2.Fields("string") & Table1.Fields("Filename") )

That's why I want to one form contains TWO Record Sources


Thanks again!
 
V

Van T. Dinh

Base your Form on a Query that combine Records from Table1 to corresponding
Records in Table2 selecting required Fields.

Check Access Help / your Access books on Queries.
 
G

gdct

Actually, some times I need put 2 Fields on a Form from two Tables.
These two Tables don't have any relation.
What should I do?
Thanks!
 
V

Van T. Dinh

How do you know the value of the Field of *which* Record from Table2 to be
displayed for the current Record on Table1, assuming the Form is bound to
Table1?
 
Top