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: Access Form/Subform Macro not working - microsoft.public.access ...Requery at Got Focus or Activate? - microsoft.public.access ... Subform Requery Not Working - microsoft.public.access Requery at Got Focus or Activate? - microsoft ... Requery at Got Focus or Activate? - microsoft.public.access ...Subform Requery Not Working - microsoft.public.access Requery at Got Focus or Activate? - microsoft.public.access ... Got Focus and Activate events not working - microsoft ... Getting a subform control to requery - microsoft.public.access ...Requery a form from its subform, then add new - microsoft.public ... Subform Requery Not Working - microsoft.public.access Requery a form from its ... form or control to ... Updating subforms not working - microsoft.public.access.forms ...... Change() docmd.Save Me.EmployeeDetails.Requery end sub butthis doesn't seem to work. ... Referencing controls in Access subform not working?? ... I use the ... Requery Subform - microsoft.public.access.formsSubform Requery Not Working - microsoft.public.access I have a form called "View Hood" that contains a textbox and subform, called "Units subform" in datasheet view. Subform sort order problem - microsoft.public.access.forms ...Subform Requery Not Working - microsoft.public.access Subform sort order problem - microsoft.public.access.forms ... Main Form & Continuous Subform (with Requery) Problem ... Subform and variable - microsoft.public.accessSubform Requery Not Working - microsoft.public.access Subform and variable - microsoft.public.access... works with a regular form but not a subform ... form that will re ... Urgent - filter subform by form - option group - microsoft.public ...Subform Requery Not Working - microsoft.public.access Urgent - filter subform by form - option group - microsoft.public ... Subform Requery Not Working - microsoft.public ... Trigger Subform "On Current" from Parent Form "On ...... but at my level of expertise, if it seems to work, I ... Follow Viewing the current record after requery a form ... subform not loading before main form - microsoft.public ... Subform in Form not editable - microsoft.public.access.forms ...Subform in Form not editable - microsoft.public.access.forms ... Requery a form from its subform, then add new ... Access Form/Subform Macro not working - microsoft.public ... Requery will not work on subform: MSAccess, vba, requery, subform ...I have been using the same form and subform combination for years. A form sets several conditions for a querydef, creates the query, then tells a subform to update ... Subform REquery not working - Access World ForumsMicrosoft Access Discussion > Forms ... Hi All, I have looked at and tried several suggestions on this site, and a couple of ... Hi All, Nvermind, I took a different ... Subform requery not working from Main form - Microsoft Access / VBASubform requery not working from Main form. Microsoft Access / VBA Forums on Bytes. Refresh/Requery Subform on an event does not work: MS Access 2007I have a form with a combo box which provides an id for a query which then populates a look up field on a subform. The problem is that until the subform is refreshed ... Microsoft Access: subform.requery code not working after update ...database.itags.org: Microsoft Access question: subform.requery code not working after update, created at:Mon, 26 May 2008 10:38:00 GMT with 1,196 bytes, last updated ... 7/23/2012 8:48:25 AM
|