Forms and sub forms for a beginner

  • Thread starter Thread starter rossy
  • Start date Start date
R

rossy

Hi

I have tried to figure this out myself, reading book after book etc
but I just don't seem to get it :-(
I have a main form with a sub form in it. The main frm has a combo bo
listing names from tblcustomers and a text box into which I want t
enter a ref number.
The subfrm lists the records from tbljobdets in a continuous for
according to the name selected from the above combo box.
At the end of each entry I have a text box that I want to be populate
with the ref number I have entered into the text box in the main frm.
I then want this number to be stored in tbljobdets as a consignmen
number. I also then want each record to have it's yes/no flag i
tbljobdets set to yes.
I see this being done via a command button on the main form. So
select a name from the combo box, this lists all the appropriat
entries, I tehn enter a ref number into the box on the main frm an
click the button that does the rest. Then I'd select another nam
etc.

So ........ it's not like I haven't tried - and it's driving me mad.
only started with Access about 2 weeks ago, so a lot to learn yet.

Any ideas/suggestions most welcome.

Thank
 
Sorry, it's not clear to me what you are trying to do. The reason for using
a main form and a subform is to be able to select a parent record in the
main form, which will then cause all related child records to be displayed
in the subform. The first thing you need to determine is your
entity-relationship schema. For instance, tblState has 50 records and
tblCity can have a large number.

tblState (frmMain)
StateID (PK)
StateName (cboState)

tblCity (sfrmCity)
CityID
StateID (FK)
CityName (cboCity)

If you setup these two tables the wizzard will build you a set of working
forms.

In general, any parent:Child One"Many relationship will work this way. You
can see how the two tables are linked (similar field name, PK <-> FK).
 
Back
Top