Access Form - Double-click question

  • Thread starter Thread starter Decembersonata
  • Start date Start date
D

Decembersonata

I have a database I'm finishing up and one of the last features I need to add
is a simple double-click event that populates the control source with a Yes
when double-clicked. For whatever reason, I can't seem to get this function
to work. Any suggestions?
 
Decembersonata,

Can you say... the double-click event of what?

What is the code or macro that you have tried so far?

Do you really mean the control source, i.e the Control Source property? Or
do you mean you want to insert this value into the control?

What sort of control are you talking about? And what is its data type - a
Yes/No field or a Text field?
 
I have a database I'm finishing up and one of the last features I need toadd
is a simple double-click event that populates the control source with a Yes
when double-clicked.  For whatever reason, I can't seem to get this function
to work.  Any suggestions?

I'm not sure why you want the Control Source of some object to be Yes,
but if that's what you really want:

On the double click even of whatever it is that you are double
clicking, add code like this

me.controlname.ControlSource = "Yes"

where controlname is whatever thing it is you want to set the
ControlSource property of.

Keven Denen
 
Here is the code thus far:
Private Sub Text93_DblClick(Cancel As Integer)
Me.Completed = "Yes"
End Sub

Nothing happens on this event.

When I say control source I just meant the field that will be populated that
my form is based off of. It's currently a text field. I want the user to be
able to double click the blank field and have a Yes populate in the field.
This then drives a later query which only pulls records with the completed
field marked as Yes.
 
Why not just have a checkbox with the controlsource = to your table field
(which, I'm assuming, is a yes/no field)?

Damon
 
Yeah, you're right, I'll just do that.

Damon Heron said:
Why not just have a checkbox with the controlsource = to your table field
(which, I'm assuming, is a yes/no field)?

Damon
 
It is a lot simpler to figure out why something isn't working if you tell us
what you did. I'm sure a lot of people could offer a lot of suggestions, but
we'd be wasting our time as they might not, in fact, have any applicability
to what you're doing.

What kind of control are you using for a bound Yes/No value? Both
CheckBoxes, Radio Buttons, and Toggle Buttons have standard single-click
action that automatically changes/reverses (aka, toggles) a Yes/No value.
Thus, it would be unusual, in my experience, to see a Double Click used as
you described, and it would be unusual to see a Yes/No value bound to a
different control.

Please be specific, precise, and concise.

Larry Linson
Microsoft Office Access MVP
 
Larry,

I realized after posting that I was really trying to make this too
complicated. I've switched the field in question to a Yes/No field, and it
works just fine now. Thanks all for the input.
 
Back
Top