I have two comboboxes.
comboboxfile - contains the name of files to search
comboboxfield - contains the fields to search according to the file selected above
the first entry is always “”
I save the data to an InternalUse table so that when the user starts the application again they can return to where they left off.
The first MsgBox(ModuleInternalUse.LastReportsFieldSelected) shows “LensID” which is what was saved.
The second MsgBox(ModuleInternalUse.LastReportsFieldSelected) shows “”
I cannot find where it is being changed. Does anyone spot the problem?
[code] ModuleInternalUse.LastPrintDataTabSelected = rs.Field(“LastPrintDataTabSelected”).IntegerValue
ModuleInternalUse.LastSessionDataTabSelected = rs.Field(“LastSessionDataTabSelected”).IntegerValue
ModuleInternalUse.LastTabSelected = rs.Field(“LastTabSelected”).StringValue
ModuleInternalUse.LastReportsFieldSelected = rs.Field(“LastReportsFieldSelected”).StringValue
ModuleInternalUse.LastReportsFileSelected = rs.Field(“LastReportsFileSelected”).StringValue
// first msgbox
MsgBox(ModuleInternalUse.LastReportsFieldSelected)
// set last reports file selected
For i = 0 To ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxFiles.ListCount - 1
If ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxFiles.List(i) = ModuleInternalUse.LastReportsFileSelected Then
ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxFiles.ListIndex = i
Exit
End If
Next
// second msgbox
MsgBox(ModuleInternalUse.LastReportsFieldSelected)
// set last reports field selected
For i = 0 To ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxField.ListCount - 1
If ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxField.List(i) = ModuleInternalUse.LastReportsFieldSelected Then
ContainerControlSessionData1.ContainerControlReports1.ContainerControlReportsLeft1.ComboBoxField.ListIndex = i
End If
Next[/code]