B
BruceInCalgary
I have a problem in my VBA code where I am trying to set the value for date
controls and checkbox controls. I get the following error each time I try
setting the date control's value to a date value from a VB variable: "The
setting you entered isn't valid for this property." I am using VB 6.3 and
Microsoft Access 2002.
Here is a code snippet:
Dim Report_StartDate As Date 'set from database table
Dim Report_EndDate As Date 'set from database table
....
'set the parameters on the form (using LANDesk Date Control)
Forms![PVR Update Well Inventories]!ReportStartDate.Value =
Report_StartDate
Forms![PVR Update Well Inventories]!ReportEndDate.Value = Report_EndDate
I also get the error message "You can't assign a value to this object" when
trying to set a checkbox on the form:
'select the report format (these are checkboxes)
Select Case Report_Format
Case "Net Gas Injected Report": Forms![PVR Update Well
Inventories]!chkNetGasInjectedReport.Value = True
Case "Gas In Place Report": Forms![PVR Update Well
Inventories]!chkGasInPlaceReport.Value = True
Case "Cumulative Gas Production Report": Forms![PVR Update Well
Inventories]!chkCumulativeGasProductionReport.Value = True
End Select
Any help to solve this problem would be greatly appreciated!
REgards, ...Bruce
controls and checkbox controls. I get the following error each time I try
setting the date control's value to a date value from a VB variable: "The
setting you entered isn't valid for this property." I am using VB 6.3 and
Microsoft Access 2002.
Here is a code snippet:
Dim Report_StartDate As Date 'set from database table
Dim Report_EndDate As Date 'set from database table
....
'set the parameters on the form (using LANDesk Date Control)
Forms![PVR Update Well Inventories]!ReportStartDate.Value =
Report_StartDate
Forms![PVR Update Well Inventories]!ReportEndDate.Value = Report_EndDate
I also get the error message "You can't assign a value to this object" when
trying to set a checkbox on the form:
'select the report format (these are checkboxes)
Select Case Report_Format
Case "Net Gas Injected Report": Forms![PVR Update Well
Inventories]!chkNetGasInjectedReport.Value = True
Case "Gas In Place Report": Forms![PVR Update Well
Inventories]!chkGasInPlaceReport.Value = True
Case "Cumulative Gas Production Report": Forms![PVR Update Well
Inventories]!chkCumulativeGasProductionReport.Value = True
End Select
Any help to solve this problem would be greatly appreciated!
REgards, ...Bruce