simon551
IS-IT--Management
- May 4, 2005
- 249
Hi,
I get an error message "byref argument type mismatch" in this bit of code developed by a former co-worker. On background, I copied this code from another form and am trying to update it for use with the current form. All I've done is copy this bit of code and change the name of the reference subform. It calls a function that is in a module called cResizer, and is used to resize controls on the form, for better reading to the user. It gets stuck on this part: fsubTimesheetReviewMode_Dets in the Form_Open event. Thanks in advance for your help.
Code:
Dim fsubTimesheetReviewMode_DetsResize As cResizer
Private Sub Form_Close()
Set fsubTimesheetReviewMode_DetsResize = Nothing
DoCmd.Close acForm, "frmTimesheetDets_edit"
End Sub
Private Sub Form_Open(Cancel As Integer)
Set fsubTimesheetReviewMode_DetsResize = New cResizer
fsubTimesheetReviewMode_DetsResize.Init Me, fsubTimesheetReviewMode_Dets, xHeight
txtTSDate.SetFocus
End Sub
Private Sub Form_Resize()
If Not fsubTimesheetReviewMode_DetsResize Is Nothing Then fsubTimesheetReviewMode_DetsResize.Resize
End Sub
I get an error message "byref argument type mismatch" in this bit of code developed by a former co-worker. On background, I copied this code from another form and am trying to update it for use with the current form. All I've done is copy this bit of code and change the name of the reference subform. It calls a function that is in a module called cResizer, and is used to resize controls on the form, for better reading to the user. It gets stuck on this part: fsubTimesheetReviewMode_Dets in the Form_Open event. Thanks in advance for your help.
Code:
Dim fsubTimesheetReviewMode_DetsResize As cResizer
Private Sub Form_Close()
Set fsubTimesheetReviewMode_DetsResize = Nothing
DoCmd.Close acForm, "frmTimesheetDets_edit"
End Sub
Private Sub Form_Open(Cancel As Integer)
Set fsubTimesheetReviewMode_DetsResize = New cResizer
fsubTimesheetReviewMode_DetsResize.Init Me, fsubTimesheetReviewMode_Dets, xHeight
txtTSDate.SetFocus
End Sub
Private Sub Form_Resize()
If Not fsubTimesheetReviewMode_DetsResize Is Nothing Then fsubTimesheetReviewMode_DetsResize.Resize
End Sub