Advanced Form Question

  • Thread starter Thread starter james
  • Start date Start date
J

james

OK, here is what I want to do.
I have a form with a subform, the main form shows a
person's information and the subform shows all the
manpower slots they could fill (no problem, works great).
What I want to do is highlight a record on the subform and
click a button on the main form that will write their man
number into that record. I know access, but this is way
beyond anything I've ever tried and I don't even have an
idea where to start looking. Thanks!
 
OK, here is what I want to do.
I have a form with a subform, the main form shows a
person's information and the subform shows all the
manpower slots they could fill (no problem, works great).
What I want to do is highlight a record on the subform and
click a button on the main form that will write their man
number into that record. I know access, but this is way
beyond anything I've ever tried and I don't even have an
idea where to start looking. Thanks!

What are the Master Link Field and Child Link Fields of the subform?
If there is a field in the manpower slots table for the person's ID,
are you using this as the link? If not, how do you determine which
records to show in the subform?

It sounds like what you're asking may be redundant, but without a
clearer idea of your table structure and the Recordsource of the
subform I'm not sure!
 
The Master form is keyed off the man number in the Master
Table. The Subform is run from a query based on man
number and or skill level on the Master Form and a second
table of manpower positions. This way if a person is
already placed in a manpower position only that record
shows up on the subform, but if they are not assigned a
position then all the positions they could fill show up.
Here is how it works:

1. Use man number on Master Form (based on info from
Master Table)to check Manpower Table for matching record
(based on man number) and display
2. If no record is found use skill level to find all
unassigned manpower positions and display

This works great, the only draw back is I have manually
input their man number on the subform(leaves room for
errors and at 500 people too much work!)

Hope this helps, thanks!
 
The Master form is keyed off the man number in the Master
Table. The Subform is run from a query based on man
number and or skill level on the Master Form and a second
table of manpower positions. This way if a person is
already placed in a manpower position only that record
shows up on the subform, but if they are not assigned a
position then all the positions they could fill show up.
Here is how it works:

1. Use man number on Master Form (based on info from
Master Table)to check Manpower Table for matching record
(based on man number) and display
2. If no record is found use skill level to find all
unassigned manpower positions and display

This works great, the only draw back is I have manually
input their man number on the subform(leaves room for
errors and at 500 people too much work!)

Hope this helps, thanks!

You should be able to put a command button on the subform with code in
its Click event like

Me!txtManNumber = Parent!txtManNumber

assuming that you have a textbox txtManNumber on both forms. The
button will apply the parent's value to the currently active record on
the subform.
 
Back
Top