I actually have two questions.
(1) I have an option group with four reports in a form. I wand to add a preview button and a print button that will open each report as they are selected. I followed Access 2003 help info and it did not work. How do I accomplish this simple task?
(2) In that same database, I have another form with a combo box and about nine selections. Four of these selection open a separate form to add info related to the selection. That works great. However, the other five items do not have to have a separate form. When selected the user should be able to go to the next field in the form. Here is the code:
Private Sub Item_Change ()
If ([Item] = "Computer") Then
DoCmd.OpenForm "Computer"
Else
If ([Item] = "Vehicles") Then
DoCmd.OpenForm "Vehicles"
Else
If ([Item] = "Furniture") Then
DoCmd.OpenForm "Furniture"
Else
If ([Item] = "Cell Phones") Then
DoCmd.OpenForm "Cell Phones"
Else
If [Item] = "table" Then
DoCmd.OpenForm "Form"
End If
End If
End If
End If
End It
End Sub
I have it tabbed, but the post untabbed it. I don't know if the word "table" is correct to proceed to the next field. I am new to VBA.
(1) I have an option group with four reports in a form. I wand to add a preview button and a print button that will open each report as they are selected. I followed Access 2003 help info and it did not work. How do I accomplish this simple task?
(2) In that same database, I have another form with a combo box and about nine selections. Four of these selection open a separate form to add info related to the selection. That works great. However, the other five items do not have to have a separate form. When selected the user should be able to go to the next field in the form. Here is the code:
Private Sub Item_Change ()
If ([Item] = "Computer") Then
DoCmd.OpenForm "Computer"
Else
If ([Item] = "Vehicles") Then
DoCmd.OpenForm "Vehicles"
Else
If ([Item] = "Furniture") Then
DoCmd.OpenForm "Furniture"
Else
If ([Item] = "Cell Phones") Then
DoCmd.OpenForm "Cell Phones"
Else
If [Item] = "table" Then
DoCmd.OpenForm "Form"
End If
End If
End If
End If
End It
End Sub
I have it tabbed, but the post untabbed it. I don't know if the word "table" is correct to proceed to the next field. I am new to VBA.