Forms and subforms

H

Hubbymax

I have a requsition form that contains 2 subforms.

Main form - info for departments for requsition table
Subform1 - info identifying who,when,etc for requsition table
Subform2 - Info on ordered items for requsition table

Each time I click to enter a new item on subform2 it is save to the
requsition table as a new record. Can I save certain info from the
main form and the subform1 at the same time so each record saved when
I click to enter a new item on subform2 it contains info that info
also? As an example, the main for contains cost code field that tells
what budget is charged, subform1 contains the workorder number, date
ordered, and date filled. All this info is needed for a monthly
billing report.
 
S

S.Clark

Can I save certain info from the... info also?
Yes. It will take VBA code, probably a query, or three, and some patience.
 
H

Hubbymax

Now I am in trouble. Querys are not one of my strong areas. This is
the last hold up in my program from working properly. I do have a
query that pulls all the information from the Req4 table where all the
info from the Req form for the report and it works very well but I a
lot of help from on line folks. I have been able to tweek this query a
bit. Here is what I need to have happen.

I have my Req form set up the way I do mostly for ease of data entry.
When the requestors info is filled in on the main form the info comes
form the DeptInfo table by way of a drop down list of deptartment code
numbers, This info stays the same until all items ordered have been
entered. This is also true for the subform1. It was needed because
it's info fields come from the Req4 table and stays the same until all
requested items have been entered. SubForm2 collects the deatils of
each item ordered and it's fields also come from the Req4 table. I
need the info from the DeptInfo table fields collected by the main
form, the infor collected from the Req4 table fields collected by
Subform1, and each oredred items details form Req4 table fields for
entry into the Req4 table. The req4 table has fields to hold this info
for each item ordered. I have no idea where to start on a query.
 
J

John W. Vinson

I have a requsition form that contains 2 subforms.

Main form - info for departments for requsition table
Subform1 - info identifying who,when,etc for requsition table
Subform2 - Info on ordered items for requsition table

Each time I click to enter a new item on subform2 it is save to the
requsition table as a new record. Can I save certain info from the
main form and the subform1 at the same time so each record saved when
I click to enter a new item on subform2 it contains info that info
also? As an example, the main for contains cost code field that tells
what budget is charged, subform1 contains the workorder number, date
ordered, and date filled. All this info is needed for a monthly
billing report.


Well... that's what Access is designed to do.

You can create a new Query and add the three tables. You may be having some
confusion by concentrating on the Forms. It's the *tables* which are
important; they contain the data. What in fact are the Recordsource properties
of the three forms? Do you have *everything* in a single Requisition table (if
so OUCH!) or do you have a table of Departments, a table of Requisitions, a
table of Items? Please describe the tables in your database, important fields,
and indicate how the tables are related.

Queries are the absolute BEDROCK of any Access application, and - once you get
the hang of them - you'll find that working with Queries is vastly easier than
trying to do everything with Forms or VBA code.
 

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