Subform Requery Not Working

  • Follow


I have a form called "View Hood" that contains a textbox and subform, called 
"Units subform" in datasheet view.

I would like the subform to automatically update with selected records as 
the user types in a search criteria.

The subform is based on the following query:

SELECT Units.[Unit ID], Units.Building, Units.[Room #], Units.[Hood #], 
Units.[Unit Comments]
FROM Units
WHERE (((Units.[Unit ID]) Like [forms]![View Hood]![Text10]));

In the "View Hood" form, the text box is named "Text10".  in the OnChange 
event, I've added:

[Forms]![View Hood]![Units subform].Requery

When I open up the "View Hood" form and type something in the "Text10" 
textbox, absolutely nothing happens.

I'm a complete n00b at this.  I'm sure I must be missing something, but I'm 
just beating my head against the wall with this.  Any suggestions?
0
Reply Utf 9/28/2007 7:14:00 PM

use the afterupdate event instead &
Me.Units_subforms.form.requery

the significant change beeing .Form (instead of asking access to requery the 
control)

HtH

Pieter


"Brad Granath" <Brad Granath@discussions.microsoft.com> wrote in message 
news:6C1566A2-2179-4F1F-9622-76863235AAB9@microsoft.com...
>I have a form called "View Hood" that contains a textbox and subform, 
>called
> "Units subform" in datasheet view.
>
> I would like the subform to automatically update with selected records as
> the user types in a search criteria.
>
> The subform is based on the following query:
>
> SELECT Units.[Unit ID], Units.Building, Units.[Room #], Units.[Hood #],
> Units.[Unit Comments]
> FROM Units
> WHERE (((Units.[Unit ID]) Like [forms]![View Hood]![Text10]));
>
> In the "View Hood" form, the text box is named "Text10".  in the OnChange
> event, I've added:
>
> [Forms]![View Hood]![Units subform].Requery
>
> When I open up the "View Hood" form and type something in the "Text10"
> textbox, absolutely nothing happens.
>
> I'm a complete n00b at this.  I'm sure I must be missing something, but 
> I'm
> just beating my head against the wall with this.  Any suggestions? 


0
Reply Pieter 9/28/2007 7:23:18 PM


Sure, put it back in the change event
I don't know wether it's a good idea though

Pieter

"Brad Granath" <BradGranath@discussions.microsoft.com> wrote in message 
news:EBE5E1E9-4472-4FF3-8676-508DF549F659@microsoft.com...
> That helps alot!
>
> Is there no way to have it update as the user type, rather than requiring 
> a
> loss of focus?  I'd like it to behave like a smart search or AutoComplete. 


0
Reply Pieter 9/29/2007 9:59:06 AM

2 Replies
489 Views

(page loaded in 0.041 seconds)

Similiar Articles:
















7/23/2012 8:48:25 AM


Reply: