ctl returns Null on Change event

D

Dymondjack

Hello again and thanks in advance...

I assume this a probably a very simple one, but help files, google and
previous posts don't seem to hold an answer for me.

I've got a control for a filter (ctlSF) and want to set the Change event to
requery a subform datasheet as each character is added. I've read many
places that using the change event for this will filter the records as each
letter is added (makes sense).

However, I cannot seem to refer to the value of the control in my criteria
expression. The value of ctlSF returns null on each change. This is an
unbound control (I assume unbound would be correct for the control, I
wouldn't think this needs to be saved to a table).

How do I get vb to recognize the characters present in the control after
each change? My next idea here is to bind the control to a system table and
update the control after each change, and then use the afterupdate to catch
the value of the control. This doesn't seem the right way to go about it at
all.

Hopefully there is something quite simple that I am missing??

Again, many thanks...

Jack
 
A

Allen Browne

In the Change event, you must refer to the Text property of the control,
e.g.:
Me.Text0.Text

The Value has not been updated yet.
 
D

Dymondjack

That would do it. Darn newbies... thanks Allen

Allen Browne said:
In the Change event, you must refer to the Text property of the control,
e.g.:
Me.Text0.Text

The Value has not been updated yet.
 

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