Selecting the "Other" checkbox

  • Thread starter Thread starter Brown
  • Start date Start date
B

Brown

Using MS Access 2K3, Pro.
I am building a form that "Has To" look just like an existing paper
Government form ------ the underlying database already has over 14,000
records, so I am constrained to use the existing data structures.
There are several data items on the paper form that have five or six
checkbox fields and "Other" with a blank line. There may be as many as
fifteen possible entries in the control source in the database.
I can match the field and check the appropriate checkbox for all but "Other"
<=[ControlSource]="Cherry Point, NC"> etc. and I can populate the blank if
"Other" is selected, but I can't get "Other" figured out.
I have tried to build an OR statement but I appear to not have the proper
syntax. Is there a KB article or reference that would get me going?

TNX
Brown
 
Brown

No, you are NOT "constrained to use the existing data structures." It might
be easier for you to not have to modify the structure and reload from the
existing version, but if you have multiple checkboxes as fields in a table,
you will have massive headaches trying to come up with all possible
combinations.

By far easier to convert what sounds like an Excel spreadsheet into a
standard Access one-to-many table relationship. Each checkbox could instead
represent one row in the "many" side table.

Note that I have not even addressed the form yet. Make poorly organized
data do things can be very tough.
 
I'm using the worst case of a problem that occursw about six times in the
report.
The data field in the table is a text field with twelve or so possible
entries. It is input to the table via a form that has a combo box with the
various options. The paper report was developed before all the locations
(the field in question) were established. The paper form has six site
listed and an option to check "Other" and fill in a blank. My requirement
is to have a user at a remote location use an Access app to capture the data
which will print out the paper form (yes, they can send it electronically,
which is much easier, but the regs require a paper version also --- ) the
paper form *must* replicate the current "approved" form.
So, I need to have the "Other" checkbox determine if the value does not
equal one of the six labeled checkboxes. I have only gotten it to work with
a single argument. I suspect it is a format/syntax thing, but I cannot get
it to work.

Brown
 
Brown

My previous response wasn't clear enough. Your DATA is not your FORM. Once
your data is better structured, you can create the forms/reports you need.

If your data is not well-structured, you will have headaches from running
into walls trying to make the forms/reports come out the way you want.

Take it from someone who had a lot of headaches... <G>
 
My data is a field with about fifteen possible entries. In the report I
need to apply a check in a checkbox (Other) if that value is NOT one of a
specific six of those values.
How do I set up the control source to ascertain whether the condition exists
that
=[location]<>((a) or (b) or (c) or (d) or (e) or (f))
I have tried several variants on this but have not stumbled onto one that
works.
 
Hi Brown,

Please try to use the following codes to check the condistion.

Private Sub Text1_AfterUpdate()

Dim col As New Collection
col.Add ("a")
col.Add ("b")
col.Add ("c")

Dim o As Variant

Dim flag As Boolean
flag = False

For Each o In col
If o = Text1.Value Then
flag = True
End If

Next

MsgBox flag
End Sub

I created a form with a text box, then type the above codes in the after
update event. It can help check if the input value meets the
conditions(equal to a, b or c). If not, flag will be false.

Does it meet your requiremets?

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
I got it to work by checking the state of the checkboxes for the specific
location options.
If they were all "No" the "Other" box is checked, if the "Other " box is
checked then a text box is populated with the value from the "location"
field.

Brown
 
Back
Top