I am working on GUI where a few forms will allow users to populate a table.
Essentially the user would open the db, then open the 'CurrentAnalytics' form and make a selection from the comboboxes and submit. Then they would select the HighClaims form which opens the input GUI. This where the problem occurs.
After text is entered, and the submit button is pressed, the table needs to be populated with the text and the text also needs to show up in middle grey text box when the form reloads. Currently my VBA code is not accomplishing these two objectives...
If anyone could take a look at the code behind these forms and offer some assistance I would greatly appreciate it.
I have attached the access db as well as posted my code below.
Form1 opens Form2, which opens Form3, which populates db and refreshes.
Form 1 (Current Analytics)
'Declare Variables for GroupName & GTSN
Dim GN As String
Dim GT As String
Private Sub cboGroups_AfterUpdate()
'Refresh the form data
Me.cboGTSN.Requery
End Sub
Private Sub Form_Open(Cancel As Integer)
'DoCmd.Maximize
End Sub
Public Sub SubmitGroups_Click()
'Open form AnalyticsMenu
DoCmd.OpenForm "AnalyticsMenu"
'Set vars to current GroupName and GTSN to pass to other forms
GN = Me.cboGroups
GT = Me.cboGTSN
'Close form CurrentAnalytics
DoCmd.Close acForm, "CurrentAnalytics"
End Sub
Form 2 (Analytics Menu)
Option Compare Database
Private Sub HighClaims_Click()
'Open Form HighClaims
DoCmd.OpenForm "HighClaims"
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Private Sub MainMenu_Click()
'Open Form MainMenu
DoCmd.OpenForm "CurrentAnalytics"
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Private Sub Exit_Click()
'Open Form Exit
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Form 3 (HighClaims)
Option Compare Database
'Define vars
Dim HighClaimsGN As String
Dim HighClaimsGT As String
'Define opening state
Public Sub Form_Open(Cancel As Integer)
Dim HighClaimsGN As String
Dim HighClaimsGT As String
'Query tblAnalytics to populate the EndNotesBox
HighClaimsGN.Value = CurrentAnalytics.GN.Value
HighClaimsGT.Value = CurrentAnalytics.GT.Value
EndnotesBox = DLookup("HighClaimsEndNotes", "tblAnalytics", "GRPNM = " & HighClaimsGN And "GTSN = " & HighClaimsGT)
End Sub
'Clear text in update textbox
Private Sub Clear_Click()
Me.UpdateBox.Value = Null
End Sub
'Close the current form and open the Main Menu via Exit button
Private Sub Exit_Click()
DoCmd.OpenForm "AnalyticsMenu"
DoCmd.Close acForm, "HighClaims"
End Sub
'Close the current form and open the Main Menu
Private Sub ReturnMM_Click()
DoCmd.OpenForm "AnalyticsMenu"
DoCmd.Close acForm, "HighClaims"
End Sub
'Submit analysis to tblAnalytics and refresh form including populating the grey box with the updated analysis
Private Sub UpdateBox_Click()
End Sub
Essentially the user would open the db, then open the 'CurrentAnalytics' form and make a selection from the comboboxes and submit. Then they would select the HighClaims form which opens the input GUI. This where the problem occurs.
After text is entered, and the submit button is pressed, the table needs to be populated with the text and the text also needs to show up in middle grey text box when the form reloads. Currently my VBA code is not accomplishing these two objectives...
If anyone could take a look at the code behind these forms and offer some assistance I would greatly appreciate it.
I have attached the access db as well as posted my code below.
Form1 opens Form2, which opens Form3, which populates db and refreshes.
Form 1 (Current Analytics)
'Declare Variables for GroupName & GTSN
Dim GN As String
Dim GT As String
Private Sub cboGroups_AfterUpdate()
'Refresh the form data
Me.cboGTSN.Requery
End Sub
Private Sub Form_Open(Cancel As Integer)
'DoCmd.Maximize
End Sub
Public Sub SubmitGroups_Click()
'Open form AnalyticsMenu
DoCmd.OpenForm "AnalyticsMenu"
'Set vars to current GroupName and GTSN to pass to other forms
GN = Me.cboGroups
GT = Me.cboGTSN
'Close form CurrentAnalytics
DoCmd.Close acForm, "CurrentAnalytics"
End Sub
Form 2 (Analytics Menu)
Option Compare Database
Private Sub HighClaims_Click()
'Open Form HighClaims
DoCmd.OpenForm "HighClaims"
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Private Sub MainMenu_Click()
'Open Form MainMenu
DoCmd.OpenForm "CurrentAnalytics"
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Private Sub Exit_Click()
'Open Form Exit
DoCmd.Close acForm, "AnalyticsMenu"
End Sub
Form 3 (HighClaims)
Option Compare Database
'Define vars
Dim HighClaimsGN As String
Dim HighClaimsGT As String
'Define opening state
Public Sub Form_Open(Cancel As Integer)
Dim HighClaimsGN As String
Dim HighClaimsGT As String
'Query tblAnalytics to populate the EndNotesBox
HighClaimsGN.Value = CurrentAnalytics.GN.Value
HighClaimsGT.Value = CurrentAnalytics.GT.Value
EndnotesBox = DLookup("HighClaimsEndNotes", "tblAnalytics", "GRPNM = " & HighClaimsGN And "GTSN = " & HighClaimsGT)
End Sub
'Clear text in update textbox
Private Sub Clear_Click()
Me.UpdateBox.Value = Null
End Sub
'Close the current form and open the Main Menu via Exit button
Private Sub Exit_Click()
DoCmd.OpenForm "AnalyticsMenu"
DoCmd.Close acForm, "HighClaims"
End Sub
'Close the current form and open the Main Menu
Private Sub ReturnMM_Click()
DoCmd.OpenForm "AnalyticsMenu"
DoCmd.Close acForm, "HighClaims"
End Sub
'Submit analysis to tblAnalytics and refresh form including populating the grey box with the updated analysis
Private Sub UpdateBox_Click()
End Sub