Hi Guys,
I'm a bit stuck.
I have two combo boxes one is called cmbRequestType and the other cmbRequestTo.
RequestTo has an After Update code that sources the data specific to the selection made in cmbRequesType.
I want to be able to store the completed form at the end of the users journey however am unsure how to do this by assigning a button, or whether a simple button would be able to store the record effectively.
Here is the dependent combo code;
Private Sub cboRequestType_AfterUpdate()
With Me.cbORequestTo
.Value = Null
.RowSource = ""
If Not IsNull(Me.cboRequestType) Then
Select Case Me.cboRequestType
Case "Local Authority"
.RowSource = "SELECT LocalAuthorityName As [Local Authority Name] FROM LocalAuthority ORDER BY LocalAuthorityName;"
Case "Company"
.RowSource = "SELECT CompanyName As [Company Name] FROM Company ORDER BY CompanyName;"
Case "Contacts"
.RowSource = "SELECT ContactFullName As [Contact Full Name] FROM Contacts ORDER BY ContactFullName;"
Case "Location"
.RowSource = "SELECT LocationPostcode As [Location Postcode] FROM Location ORDER BY LocationPostcode;"
Case "Events"
.RowSource = "SELECT EventName As [Event Name] FROM Events ORDER BY EventName;"
Case "Universities"
.RowSource = "SELECT UniversityName As [University Name] FROM Universities ORDER BY UniversityName;"
End Select
If .ListCount > 0 Then
.Value = .ItemData(0)
.SetFocus
.Dropdown
End If
End If
End With
End Sub
Once the user has finished their journey through them to click a button and save the record. My question is as follows;
It's important as each request for which ever body needs to be monitored for our internal efficiency.
My intuition tells me I might have to rework how I've approached this. All help is greatly appreciated as allways THANKS!
I'm a bit stuck.
I have two combo boxes one is called cmbRequestType and the other cmbRequestTo.
RequestTo has an After Update code that sources the data specific to the selection made in cmbRequesType.
I want to be able to store the completed form at the end of the users journey however am unsure how to do this by assigning a button, or whether a simple button would be able to store the record effectively.
Here is the dependent combo code;
Private Sub cboRequestType_AfterUpdate()
With Me.cbORequestTo
.Value = Null
.RowSource = ""
If Not IsNull(Me.cboRequestType) Then
Select Case Me.cboRequestType
Case "Local Authority"
.RowSource = "SELECT LocalAuthorityName As [Local Authority Name] FROM LocalAuthority ORDER BY LocalAuthorityName;"
Case "Company"
.RowSource = "SELECT CompanyName As [Company Name] FROM Company ORDER BY CompanyName;"
Case "Contacts"
.RowSource = "SELECT ContactFullName As [Contact Full Name] FROM Contacts ORDER BY ContactFullName;"
Case "Location"
.RowSource = "SELECT LocationPostcode As [Location Postcode] FROM Location ORDER BY LocationPostcode;"
Case "Events"
.RowSource = "SELECT EventName As [Event Name] FROM Events ORDER BY EventName;"
Case "Universities"
.RowSource = "SELECT UniversityName As [University Name] FROM Universities ORDER BY UniversityName;"
End Select
If .ListCount > 0 Then
.Value = .ItemData(0)
.SetFocus
.Dropdown
End If
End If
End With
End Sub
Once the user has finished their journey through them to click a button and save the record. My question is as follows;
- How do you create an OnClick event that stores all the information from the fields on the report whilst matching the corresponding row source value returned in the cmbRequestTo box i.e. XName, with XNames record number from it's original table.
It's important as each request for which ever body needs to be monitored for our internal efficiency.
My intuition tells me I might have to rework how I've approached this. All help is greatly appreciated as allways THANKS!