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

  • Thread starter Thread starter gdct
  • Start date Start date
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 ...
 
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!
 
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.
 
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!
 
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top