Benjamin Bolduc
Registered User.
- Local time
- Today, 04:10
- Joined
- Jan 4, 2002
- Messages
- 169
Hi everyone!
I'm having trouble with form I'm working on.
I have an Option Group on the main form that has 3 options and a subform where I put inventory records. I want the form to fill in a feild on the subform automatically depending on which option is selected as I fill in records. I thought I did for a minute, but it will only fill in the first record of the subform. Here is my code:
Private Sub Form_Current()
If Me.CompanyChoose = 1 Then
Me.Glass_Inventory_Entry_subform!Company = "Lyndonville (Nakano)"
End If
If Me.CompanyChoose = 2 Then
Me.Glass_Inventory_Entry_subform !Company = "Crossville (Nakano)"
End If
If Me.CompanyChoose = 3 Then
Me.Glass_Inventory_Entry_subform !Company = "Oasis"
End If
End Sub
Does anyone know why it only fills in the first record? And how to fix it? Any help would be greatly appreciated since I already told my boss that this was done and I have to present it later this afternoon ;(
Thanks!
I'm having trouble with form I'm working on.
I have an Option Group on the main form that has 3 options and a subform where I put inventory records. I want the form to fill in a feild on the subform automatically depending on which option is selected as I fill in records. I thought I did for a minute, but it will only fill in the first record of the subform. Here is my code:
Private Sub Form_Current()
If Me.CompanyChoose = 1 Then
Me.Glass_Inventory_Entry_subform!Company = "Lyndonville (Nakano)"
End If
If Me.CompanyChoose = 2 Then
Me.Glass_Inventory_Entry_subform !Company = "Crossville (Nakano)"
End If
If Me.CompanyChoose = 3 Then
Me.Glass_Inventory_Entry_subform !Company = "Oasis"
End If
End Sub
Does anyone know why it only fills in the first record? And how to fix it? Any help would be greatly appreciated since I already told my boss that this was done and I have to present it later this afternoon ;(
Thanks!