Adding text boxes from more than one table to a form

G

Guest

Hi,
I want to add a text box showing a date which is stored in a different table
in the personel form. This text box is purely to show the date, how can I do
this please?

Iain
 
R

Rob Parker

Hi Iain,

There's basically two ways to do this, and which one you choose will depend
upon your data and hows it's related.

1. Put the form's current recordsource (table or query) into a new query,
and include the other table. Link appropriately, add the fields you require
to the query's output, and use te new query as the recordsource for your
form.

2. Use a dLookup expression to retrieve the data from the other table. Set
the datasource for your textbox to something like:
=dLookup("NameOfDateField","NameOfTable","Criteria expression")
See Help on domain aggregate functions for more detail if you're not
familiar with this.

HTH,

Rob
 
G

Guest

If the date is always the same, regardless of the current record, you can use
a DLookup as the Control Source of the text box; otherwise, use the Form
Current event to populate the text box based on the current record.
 

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

Top