Please help

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

Guest

I need to build a form with some unique properties. I have a "Main" table and a "Details" table. Every Main entry has a number of Detail entries, linked via a "TransNumber" field. What I need to do is have a form that simultaneously shows every Detail record associated with every Main record that has a "Maturity Date" (a field in the main table) with a value of today.

For example, let's say that there are 10 entries in Main with TransNumber 1, 2, ..., 10. Entries 2, 4, 7, and 9 have a Maturity Date of today and each Main Entry has three detail records a,b, and c. I need this form to simultaneously display Detail Records 2a, 2b, 2c, 4a, 4b, 4c, 7a, 7b, 7c, 9a, 9b, and 9c.

Any ideas? Thank in Advance,
Nick
 
create a new query, adding both tables to it. if you set the link in the
Relationships window, they'll probably show the link automatically - if not,
create the link in the query. pull the fields you want to see into the QBE
grid, including the date field from the main table. set a criteria on the
date field, as
Date().
create a form based on the query. *note*: this query will probably not be
an updateable recordset, meaning you can display the records in the form,
but not update them or add new records.

hth


NickM said:
I need to build a form with some unique properties. I have a "Main" table
and a "Details" table. Every Main entry has a number of Detail entries,
linked via a "TransNumber" field. What I need to do is have a form that
simultaneously shows every Detail record associated with every Main record
that has a "Maturity Date" (a field in the main table) with a value of
today.
For example, let's say that there are 10 entries in Main with TransNumber
1, 2, ..., 10. Entries 2, 4, 7, and 9 have a Maturity Date of today and
each Main Entry has three detail records a,b, and c. I need this form to
simultaneously display Detail Records 2a, 2b, 2c, 4a, 4b, 4c, 7a, 7b, 7c,
9a, 9b, and 9c.
 
Design a query using your main table. Add the fields you want to include on
your Main form. In the criteria under Maturity date add Date(). Now set the
Record Source of your main form to this query.

--
Reggie

www.smittysinet.com
----------
NickM said:
I need to build a form with some unique properties. I have a "Main" table
and a "Details" table. Every Main entry has a number of Detail entries,
linked via a "TransNumber" field. What I need to do is have a form that
simultaneously shows every Detail record associated with every Main record
that has a "Maturity Date" (a field in the main table) with a value of
today.
For example, let's say that there are 10 entries in Main with TransNumber
1, 2, ..., 10. Entries 2, 4, 7, and 9 have a Maturity Date of today and
each Main Entry has three detail records a,b, and c. I need this form to
simultaneously display Detail Records 2a, 2b, 2c, 4a, 4b, 4c, 7a, 7b, 7c,
9a, 9b, and 9c.
 
I'm a big fat idiot

O.K., I thought I couldn't do this because I wouldn't be able to modify an underlying table if a form was populated with a query. I mean, I've made other forms off of queries that won't allow me to change the underlying data! What's the difference

:-

Thanks for your patience
Nick
 
Queries can be "updateable" or "not updateable". Most Select queries will
allow you to update data from the many side of the relationship and
sometimes from the one side (depending on what you're updating on the one
side, it may require that cascade updates are set in the table
relationships). Calculated fields (in otherwise updateable queries),
aggregate queries, union queries, and just about anything else where it may
be possible to misunderstand what you want to edit or if it might break a
relationship, aren't updateable.

--
Wayne Morgan
Microsoft Access MVP


NickM said:
I'm a big fat idiot.

O.K., I thought I couldn't do this because I wouldn't be able to modify an
underlying table if a form was populated with a query. I mean, I've made
other forms off of queries that won't allow me to change the underlying
data! What's the difference?
 
Back
Top