Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '13' type mismatch Access 2003

Status
Not open for further replies.

ValF47

MIS
Jan 24, 2007
13
US
I am getting the error message "Run-time error '13': Type mismatch in my access 2003 database when I move onto another entry. The database is very basic and used for holding hardware and software inventory. It has 2 forms, one for hardware and one for software. The software form is the one i am getting the error message on it. There is a check box on this form that if selected enables a text box. If not selected, the text box is not enabled. The code is below and the line where the error is occuring is marked with a '*'. Thanks.

Private Sub Form_Current()
*Me!RenewalDate.Enabled = Me!Renew
End Sub

Private Sub Renew_AfterUpdate()
If Renew.Value = vbChecked Then
RenewalDate.Enabled = False
Else
RenewalDate.Enabled = True
End If
End Sub

Private Sub Renew_Click()
If Renew.Value = vbChecked Then
RenewalDate.Enabled = False
Else
RenewalDate.Enabled = True
End If
End Sub
 
Is it possible that Me!Renew is Null? Try:
Private Sub Form_Current()
Me!RenewalDate.Enabled = Nz(Me!Renew,0)
End Sub


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top