Hi,
Without getting into the long, sordid story as to why, suffice it to say that I have a data entry form that contains static data from a union query. Linked to the main form are two subforms linked to one of the two queries upon which the union query is based. Before the form loads, the user will give the unique identifier ("SP"
to the particular record in which they wish to enter data (based on Fiscal Year - one query is for all records before 7/1/02, and the other starts with 7/1/02). What I would like to happen, is to have the subform open or made visible that corresponds to the SP entered. The code I have written is below:
I have the subforms in the same place on the form, they are the same color and contain the same fields, so that the user won't notice any difference in forms when entering the information.
The older records subform {"EntrySectySubform"} works fine and I can enter that information, but the problem I am running into is when I enter an SP number greater or equal to 2030000. "EntrySectySubform" stays on top and I can't get to "2003SectySubform". Am I going about this the wrong way (I must be, because it's not working)? I have to get this up and running by next week and, of course, I was given this assignment earlier this week, along with a number of other projects... sorry, had to vent there. Anyway, if anyone has a better idea, or needs more information from me, please let me know - I'm taking a break from this now. Thanks in advance!
JayeD
"I'm sure of two things: there IS a God, and I'm NOT Him!" - R. Williams
Without getting into the long, sordid story as to why, suffice it to say that I have a data entry form that contains static data from a union query. Linked to the main form are two subforms linked to one of the two queries upon which the union query is based. Before the form loads, the user will give the unique identifier ("SP"
Code:
Private Sub Form_Load()
On Error GoTo Err_Form_Load
If Forms!SectyEntryForm!SP < 2030000 Then
[Forms]![SectyEntryForm]![2003SectySubform].Visible = False
[Forms]![SectyEntryForm]![EntrySectySubform].Visible = True
Else
[Forms]![SectyEntryForm]![2003SectySubform].Visible = True
[Forms]![SectyEntryForm]![EntrySectySubform].Visible = False
End If
Exit_Form_Load:
Exit Sub
Err_Form_Load:
Resume Exit_Form_Load
End Sub
The older records subform {"EntrySectySubform"} works fine and I can enter that information, but the problem I am running into is when I enter an SP number greater or equal to 2030000. "EntrySectySubform" stays on top and I can't get to "2003SectySubform". Am I going about this the wrong way (I must be, because it's not working)? I have to get this up and running by next week and, of course, I was given this assignment earlier this week, along with a number of other projects... sorry, had to vent there. Anyway, if anyone has a better idea, or needs more information from me, please let me know - I'm taking a break from this now. Thanks in advance!
![[bugeyed] [bugeyed] [bugeyed]](/data/assets/smilies/bugeyed.gif)
"I'm sure of two things: there IS a God, and I'm NOT Him!" - R. Williams