Hello!
I am very new to Access and VBA, so please bare with me if I am being dumb
I am creating a database to track demands for items, place, update etc. So far i've been managing quite well just using YouTube and Google. However i've been stuck on this next part for 6 hours and am totally stumped!
I have created a multiple forms to place demands against each account. To make it easier for the users, I am trying to create a Home Form in which they can select which Account they want to demand against and to right there. So far on this Home Form I have a ComboBox linked to a master sheet, and a button.
Through trail and error I have managed to get the button to load a Form, however my current issue is that no matter what I have selected in the ComboBox, only the first form in the coding ever opens!
There will be approximately 50 forms, which I am guessing I will just have to copy/paste and change names. For now just trying to get it to work with two XD
I almost hope I am just being silly and missing something easy!
I am very new to Access and VBA, so please bare with me if I am being dumb

I am creating a database to track demands for items, place, update etc. So far i've been managing quite well just using YouTube and Google. However i've been stuck on this next part for 6 hours and am totally stumped!
I have created a multiple forms to place demands against each account. To make it easier for the users, I am trying to create a Home Form in which they can select which Account they want to demand against and to right there. So far on this Home Form I have a ComboBox linked to a master sheet, and a button.
Through trail and error I have managed to get the button to load a Form, however my current issue is that no matter what I have selected in the ComboBox, only the first form in the coding ever opens!
Code:
Private Sub NewDemand_Click()
On Error GoTo NewDemand_Click_Err
If cboTailNumber = ZZ382 Then
DoCmd.OpenForm "frmZZ382Demand", acNormal, ""
Else
If cboTailNumber = ZZ383 Then
DoCmd.OpenForm "frmZZ383Demand", acNormal, ""
NewDemand_Click_Exit:
Exit Sub
NewDemand_Click_Err:
MsgBox Error$
Resume NewDemand_Click_Exit
End If
End If
End Sub
There will be approximately 50 forms, which I am guessing I will just have to copy/paste and change names. For now just trying to get it to work with two XD
I almost hope I am just being silly and missing something easy!