Run time error 214352567 code not right

B

buscher75

Within my form I have a checkbox that once clicked requires three fields to
be entered. I have codes to open a pop-up text box for each entry. These
entries are subject to validation rules and if entered incorrectly, I get a
run-time error 214352567. Then the pop-up box disappears and the user does
not finish entering in their data into the pop-up boxes.

Basically I do not have the code written to loop back to the pop-up box.
Can anyone help with this? Here is my code:

Private Sub Chk005024_Click()
If Chk005024 Then
Serial005024.Visible = True
Me.Serial005024.SetFocus
Me.Serial005024 = InputBox("Scan the DPF Serial Number")
If Len(Me.Serial005024 & "") > 0 Then
Hardware005024.Visible = True
Me.Hardware005024.SetFocus
Me.Hardware005024 = InputBox("Scan the Hardware Box DPF Option")
End If
If Len(Me.Hardware005024 & "") > 0 Then
KIT005024.Visible = True
Me.KIT005024.SetFocus
Me.KIT005024 = InputBox("Scan the DPF Kit Box")
End If
If Len(Me.KIT005024 & "") > 0 Then
Me.Chk005025.SetFocus
Else
Me.Chk005024 = False
Call Chk005024_Click
End If
Else
Me.Chk005025.SetFocus
Me.Serial005024 = Null
Me.Hardware005024 = Null
Me.KIT005024 = Null
Me.Serial005024.Visible = False
Me.Hardware005024.Visible = False
Me.KIT005024.Visible = False
End If

End Sub


Any help is appreciated! Thanks.
 
D

Dennis

Why go through all that hassle? Why not just have a textbox control on the
main form associated with each checkbox? The textboxes start out disabled. If
the user clicks one of the associated checkboxes, the textbox gets enabled
and the focus set to it. Once the user Exits the textbox (onExit event) the
various applicable edits can be checked, and an error message generated if
necessary.
 
B

buscher75

It has to do with no extra space on the form. These are options that can be
married up with the main product. Each option has a check box and a text box
field. Just as you described below. The check box option in question has
three fields associated with it.

Thanks anyway.
 

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