Adding controls to a subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Okay, here's the problem.

I've a form which contains a subform that gets data from two tables.
Everything was fine until i needed to add a new field to the one of the
tables.

Now, the data is fine but i can't add a check box for the new data field -
after clicking on properties and then data then control source, the newly
added field in the table does not appear in the list.

What do you think?
 
If the data comes from more than one table, then the record source of the
form must be either a SQL statement or the name of a saved query that joins
those two tables. You will need to add the new field to the SQL statement or
query before it becomes visible to the form.
 
Aha - that makes sense.

Can you tell me where to edit the SQL? I'm new to Access, forms and such.


Cheers dude,
Mort
 
I should add that when I click on the "view button" I don't get the SQL View
option, just design, form, datasheet and pivot

Cheers
 
Open the form (the one that is used as a subform, not the main form) in
design view. If the Properties window is not visible, select Properties from
the View menu. If the Properties window is showing the properties of one of
the controls on the form rather than the properties of the form itself,
choose Select Form from the Edit menu. Select the Data tab in the Properties
window. Click in the Record Source field in the Properties window, then
click the builder button - the one with the ellipsis (...) - which appears
to the right of the Record Source field.
 
I'm an idiot - i see what you mean now. My problem is that the form (and
subform) are getting their data directly from the two tables - not through a
query. It's almost as if the form is running a hidden query to get the data,
as anything new added to the table cannot be referenced referenced in the
form.

What do you think?
 
Perfect - so as long as the form gets the data from the query and not
directly from the tables, the form can display everything.

Nice one dude - I really appreciate your help.
All the best,
Mort
 
I'm sorry, I'm afraid you lost me there. What is the Record Source of the
main form? What is the Record Source of the subform? And to which table did
you add the new field?
 
The record source for the main form was the main table (with links to a
second table).

Not to worry now, changing the source to a query has solved the problem.

Thanks again.
 
Back
Top