Help..I've created a monster.

I

indygirl

I am a complete novice with Access and have been trying to muddle through
creating a database. So far, I have been much more successful than what I
thought.
I have a form with 2 sub-forms. The first form allows the user to view
general information about a client. This form is not data entry and is linked
with Outlook Contacts from our server. The 1st sub-form is a data entry form
allowing the users to enter specific information about an order for the
client chosen on the main form. The 2nd sub-form is similar to the first -
data entry.

My dilemma...my sub-form does not link the record with the client chosen
from a drop down menu on the main form. Also, I cannot seem to save a record
with that command button.

What I would like to see is a database where the user can chose a client (on
the main form), click a command button (on the main form) to open the
sub-form to view all orders from that client and add any order as a new
record.

I am lost as to how to create this. Can someone lend some advice so I can
complete my FrankenBase?
 
P

PeteyP

By no means an Access pro here. But my thought is to look at the Northwind
sample database provided with Access, as it has a form/subform/subform in it.
It sounds to me as if you could have a easily install command button on your
main form that pops up a form allowing review/addition of orders matching up
with clients.
 
I

indygirl

Thanks PeteyP. I looked at the Northwind sample database and it did not help
that much. I have my main form and my 2 subforms. I have command buttons that
open the forms allowing the user to review information. However; the
information that I need to auto populate does not. I need certain text boxes
complete based on the drop down menu selection from the main form. For
example: I choose Company 'A' on form 1, click command button to navigate to
form 2 and view all the orders (records) for Company 'A'. How do I get the
text fields to auto populate?
 
C

Carl Rapson

I suspect you're using the term 'subform' incorrectly. In Access, a subform
is a form that is embedded on another form. If you are opening a form in
respose to a button click, then it is not a subform, it's just another form.

How are you telling the second form which records to display? What you need
to do is pass the key (Company) value (hopefully this is a number, not a
name) to the second form (via the OpenArgs parameter of the OpenForm
method), then change the second form's RecordSource property to retrieve
those records you want (most likely in the Form_Load event). By configuring
the second form as a Continuous form, you can easily add new records. Access
should handle everything else for you.

Carl Rapson
 
Top