Run-time error 2465

S

SusieQ

Hello,

I have VBA code that sets a checkbox = True else checkbox = False. I get a
2465 error on the Else statement even though it's identical to the True
statement with the exception of =False. If I remove the else False statement
and open the form, no problem. If I copy the True statement and paste to
Else (so both are True), get 2465 error. Code looks like:
Forms!frmVet.Form!frmFeline!chkVac = True (works)
Else
Forms!frmVet.Form!frmFeline!chkVac = False (error 2465)

From what I've read, this error drives everyone batty. You can add another
to the list. Any ideas?

I've noticed other strange things going on. I have a no. of combo boxes
where I select the bound column =1. It works in every case except for one
where it displays only the first field (column 0) even if I enter Bound
Column=1 with Column count =2. I had to switch the order of the two fields
in Row Source to get the right one to appear in the combo box.

I'm beginning to wonder if Access isn't that stable. Are these known issues
with Access 2000?

Thanks in advance,
Susie
 
J

John Mishefske

SusieQ said:
Hello,

I have VBA code that sets a checkbox = True else checkbox = False. I get a
2465 error on the Else statement even though it's identical to the True
statement with the exception of =False. If I remove the else False statement
and open the form, no problem. If I copy the True statement and paste to
Else (so both are True), get 2465 error. Code looks like:
Forms!frmVet.Form!frmFeline!chkVac = True (works)
Else
Forms!frmVet.Form!frmFeline!chkVac = False (error 2465)

From what I've read, this error drives everyone batty. You can add another
to the list. Any ideas?

I've noticed other strange things going on. I have a no. of combo boxes
where I select the bound column =1. It works in every case except for one
where it displays only the first field (column 0) even if I enter Bound
Column=1 with Column count =2. I had to switch the order of the two fields
in Row Source to get the right one to appear in the combo box.

The code you listed depends on the default property being the .Value property. I've heard
of problems with this in certain Access versions/servicepacks.

Can you try this and see if it helps:

If (someCondition) Then
Forms!frmVet.Form!frmFeline!chkVac.Value = True '(works)
Else
Forms!frmVet.Form!frmFeline!chkVac.Value = False '(error 2465)
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top