Runtime Errors - 64224 and 3421 (1 Viewer)

STEVENCV

Registered User.
Local time
Today, 15:20
Joined
Feb 17, 2012
Messages
76
Hi all,

A colleague of mine is creating a database (attached), but is getting run-time errors.

When it opens, a menu box opens for the user. Click on "Add Client" on this and it opens the 'AddClientInfo' form.

As you can guess, this is where the user will input client details.

There seems to be a problem with the "Sensor2" field, which is loose at the bottom of the form (because I have removed it and recreated it to try and fix this error previously). It is a multiple option combo box.

If that field is blank when I click the 'Add Client' button on this form, I get:

Code:
Run-time error '64224': Method 'Value' of object 'Field2' failed.

However, if I have chosen 1 or more options from that combo box I get:

Code:
"Run-time error '3421': Data type conversion error"

When I debug, each error points to the same line:

Code:
rstAddClient("Sensor2").Value = CboSensor2.Value
.

Can anyone tell me what I have done wrong here, and how to fix it?
 

Attachments

  • Database Design Original.zip
    571.2 KB · Views: 138

STEVENCV

Registered User.
Local time
Today, 15:20
Joined
Feb 17, 2012
Messages
76
Thank you for the reply.

I won't admit to understanding all of the information on the page you linked to, but am I right in assuming that we should avoid multiple choice drop downs like the plague?

Are standard drop down boxes OK?

I can see three workarounds - can you tell me if I am missing a better one?

1) Free text box instead of multiple choice drop down. This isn't going to happen, because multiple users will be inputting data and we would end up with a mess.

2) Instead of one multiple choice drop down field, we have one field for each choice in the original drop down, so people can select multiple sensors for a client, but in seperate fields.

3) We have tick boxes for each of the sensors.
 

RuralGuy

AWF VIP
Local time
Today, 09:20
Joined
Jul 2, 2005
Messages
13,826
Multiple choice dropdown (ComboBoxes) are just fine on forms, just not in tables.
 

Users who are viewing this thread

Top Bottom