Good day all,
I have come across an issue with a combo box on my form.
- The combo contains a list of process types for the record.
- One of the list items triggers a process that opens another form based on an identifier in the form. In other words, if someone selects a certain list entry, the next step in the process triggers.
- The one list item is working great.
- The problem arises when I need a different item in the list to trigger a completely separate process.
- The field on this form is called [Request Type] and is a combo box.
- The code is in the "After Update" property.
- The example is for the list item "Death".
- The next item in the list that needs this functionality is "DB App Disability", shown below.
______________________________________
Private Sub Request_Type_AfterUpdate()
If ([Type] = "Death") Then
DoCmd.OpenQuery "FindDupesRnLCheckpoint", acViewNormal, acReadOnly
DoCmd.OpenForm "frm_RnLchkresults"
DoCmd.Close acQuery, "FindDupesRnLCheckpoint"
End If
End Sub
______________________________________
As you can see, this opens and closes a series of items. All of this currently functions great.
Now, I need for the other types to do things like opening a form as well. When I add the code for the other type, it will either only conduct one of the functions or it wont let me open the form containing the field because of an ambiguous designation error.
I'm sure this is because of my lack of VBA knowledge.
- The code below is for the "DB App Disability" type from the combo box.
- This functions well when it is the only function in the "after update" property.
______________________________________
Private Sub Request_Type_AfterUpdate()
If ([Type] = "DB App Disability") Then
DoCmd.OpenForm "frm_DBAppProc1", acNormal, , , acFormEdit, acWindowNormal
End If
End Sub
______________________________________
This will need to continue for the rest of the types in the combo box list.
I've tried combining the code in several different ways but have not been successful. Anyone out there that can help with this?
Thank you.