E
E.Q.
I'm working on my first Access database and have come accross a couple
problems. The first one I posted in "New Users" but have received no
response so I thought I'd post here, since it is ultimately a form problem.
The second one may be an example of a new user trying to force a bad design,
but I think what I want to do should be possible.
Problem No. 1: SQL doesn't work when form imported as a subform.
I created a form (fsubEventDetail) with the intent of using it as a subform.
One combo box control (cboObject) is populated by the user-selected value of
another control (cboArea). When I created the form, the source for cboObject
had the following SQL
Select Distinct chrObject
From tblAreas
Where chrArea = Forms!fsubEventDetail.cboArea;
That worked perfectly (along with a Me.Refresh) to get the desired drop-down
list for the user. However, when I placed this as a subform on a form called
frmShiftDetail I couldn't get it to work. I was hoping that the subform
wizard would make any appropriate changes, but that didn't happen. Next I
tried to edit the "where" clause as follows:
Where chrArea = Forms!frmShiftDetail!Form!fsubEventDetail.cboArea;
unfortunately I keep getting a parameter dialogue box.
I'm obviously missing something.
Problem No. 2: Linking tabbed sheets based on subforms.
My form frmShiftDetail has a tabbed control. One tab has the subform I
mentioned above. In addition, that tab holds text box controls displaying
date, shift and Operator name. The subform in this context displays the log
events entered by a given operator during one shift. I have created a
continuous form (fsubPP_Event_Overview) based on a query that displays an
abreviated version of each log event. I'd like to add the continuous form to
the second tab such that the operator could use the continuous form to review
previous log entries. From the continuous form, I'd like to have a button
control that will display the detailed listing for the shift the log was
entered. The problem is that the matching fields between the tabs are both
on subforms. If the details tab is current, I'd like to have the button
respond based on what has focus. If a record is selected within the subform,
I'd like to reference the corresponding record on the continuous form (both
contain the field PPLog_ID ), if something outside the subform has focus,
I'd like the button to simply move to the last record entered in the
continuous form.
I'm not sure if there's these two problems are directly related.
Any help will be appreciated.
Thanks,
E.Q.
problems. The first one I posted in "New Users" but have received no
response so I thought I'd post here, since it is ultimately a form problem.
The second one may be an example of a new user trying to force a bad design,
but I think what I want to do should be possible.
Problem No. 1: SQL doesn't work when form imported as a subform.
I created a form (fsubEventDetail) with the intent of using it as a subform.
One combo box control (cboObject) is populated by the user-selected value of
another control (cboArea). When I created the form, the source for cboObject
had the following SQL
Select Distinct chrObject
From tblAreas
Where chrArea = Forms!fsubEventDetail.cboArea;
That worked perfectly (along with a Me.Refresh) to get the desired drop-down
list for the user. However, when I placed this as a subform on a form called
frmShiftDetail I couldn't get it to work. I was hoping that the subform
wizard would make any appropriate changes, but that didn't happen. Next I
tried to edit the "where" clause as follows:
Where chrArea = Forms!frmShiftDetail!Form!fsubEventDetail.cboArea;
unfortunately I keep getting a parameter dialogue box.
I'm obviously missing something.
Problem No. 2: Linking tabbed sheets based on subforms.
My form frmShiftDetail has a tabbed control. One tab has the subform I
mentioned above. In addition, that tab holds text box controls displaying
date, shift and Operator name. The subform in this context displays the log
events entered by a given operator during one shift. I have created a
continuous form (fsubPP_Event_Overview) based on a query that displays an
abreviated version of each log event. I'd like to add the continuous form to
the second tab such that the operator could use the continuous form to review
previous log entries. From the continuous form, I'd like to have a button
control that will display the detailed listing for the shift the log was
entered. The problem is that the matching fields between the tabs are both
on subforms. If the details tab is current, I'd like to have the button
respond based on what has focus. If a record is selected within the subform,
I'd like to reference the corresponding record on the continuous form (both
contain the field PPLog_ID ), if something outside the subform has focus,
I'd like the button to simply move to the last record entered in the
continuous form.
I'm not sure if there's these two problems are directly related.
Any help will be appreciated.
Thanks,
E.Q.