Replace Multiple forms and subforms...

raghuprabhu

Registered User.
Local time
Today, 04:10
Joined
Mar 24, 2008
Messages
154
I have attached a small database in Access 2003. It contains 14 forms. I think 10 forms are redundant.

I have six forms as listed below. All the forms are similar. On the frmSplash I have 6 buttons to open these forms.

frmCeaseOpenARMY
frmCeaseOpenNAVY
frmCeaseOpenRAAF
frmCommenceOpenARMY
frmCommenceOpenNAVY
frmCommenceOpenRAAF

The following are the six subforms. These too are similar.

subfrmCeaseOpenARMY
subfrmCeaseOpenNAVY
subfrmCeaseOpenRAAF
subfrmCommenceOpenARMY
subfrmCommenceOpenNAVY
subfrmCommenceOpenRAAF

1) How can I code to use only one form and one subform please?

2) In each of the sub forms there are three fields DRMS Ref, References andComments. When these fields are clicked the frmPopEdit pops up. It has a label with "Spell Checker" (Uncle Gizmo's). I need to help to change this to either "DRMS Ref" or "References" or "comments" when the respective field is clicked.

Thanks in advance
 

Attachments

2) In each of the sub forms there are three fields DRMS Ref, References andComments. When these fields are clicked the frmPopEdit pops up. It has a label with "Spell Checker" (Uncle Gizmo's). I need to help to change this to either "DRMS Ref" or "References" or "comments" when the respective field is clicked.

To change the caption, you need something like the following in red:

Code:
Private Sub DRMSRef_Click()
    Dim strDocName As String
    strDocName = "frmPopEdit"
    DoCmd.OpenForm strDocName
    [COLOR="Red"]Forms!frmPopEdit.Label42.Caption = "DRMSReference"[/COLOR]
End Sub

1) How can I code to use only one form and one subform please?

I am not sure why your are using the main form since it is unbound to the subform (unless I am missing something). I was thinking that it would be easier to use the subform directly as the main form. To do this, you would also use 1 query on which that form should be based. You would then use a couple of combo boxes in your splash form to select the action (cease or commence) & the service and then use those selections to filter the form when it opens. I've attached your database with the combo box scenario. I also added the code to change the caption based on what control was clicked.
 

Attachments

I'm glad you were able to come to a solution.
 

Users who are viewing this thread

Back
Top Bottom