A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

criteria from form not working



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2007, 11:31 AM posted to microsoft.public.access.queries
franklinbukoski
external usenet poster
 
Posts: 84
Default criteria from form not working

The following is a sql view of my query:
SELECT Subtopics.Subtopics
FROM [S1 Net Topics] INNER JOIN Subtopics ON [S1 Net Topics].[Topic ID] =
Subtopics.[Topics ID]
WHERE ((([S1 Net Topics].Topic)=[forms]![startup]![list1]));

when I click on an item in a listbox on a form called Startup, I want all of
the subtopics to show up in another form (in a listbox) called Subtopics.
The criteria i set is not prompting a filter action though. I had it working
but can't reproduce the desired results.
  #2  
Old February 12th, 2007, 12:35 PM posted to microsoft.public.access.queries
Duane Hookom
external usenet poster
 
Posts: 7,177
Default criteria from form not working

I expect you need to code to Requery the subtopics list on your other form.
--
Duane Hookom
Microsoft Access MVP


"franklinbukoski" wrote:

The following is a sql view of my query:
SELECT Subtopics.Subtopics
FROM [S1 Net Topics] INNER JOIN Subtopics ON [S1 Net Topics].[Topic ID] =
Subtopics.[Topics ID]
WHERE ((([S1 Net Topics].Topic)=[forms]![startup]![list1]));

when I click on an item in a listbox on a form called Startup, I want all of
the subtopics to show up in another form (in a listbox) called Subtopics.
The criteria i set is not prompting a filter action though. I had it working
but can't reproduce the desired results.

  #3  
Old February 12th, 2007, 01:20 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default criteria from form not working

Do you have code in the after update event of [forms]![startup]![list1] that
will force a requery of the listbox on the SubTopics form?

Something like the following would be needed. Of course, this means that
the SubTopics form would have to be open for this to work without generating
an error.

Private Sub List1_AfterUpdate()
Forms!frmSubTopics!ListSubTopics.Requery
End Sub


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"franklinbukoski" wrote in
message ...
The following is a sql view of my query:
SELECT Subtopics.Subtopics
FROM [S1 Net Topics] INNER JOIN Subtopics ON [S1 Net Topics].[Topic ID] =
Subtopics.[Topics ID]
WHERE ((([S1 Net Topics].Topic)=[forms]![startup]![list1]));

when I click on an item in a listbox on a form called Startup, I want all
of
the subtopics to show up in another form (in a listbox) called Subtopics.
The criteria i set is not prompting a filter action though. I had it
working
but can't reproduce the desired results.



  #4  
Old February 13th, 2007, 10:55 AM posted to microsoft.public.access.queries
franklinbukoski
external usenet poster
 
Posts: 84
Default criteria from form not working

Thank you both very much.

"John Spencer" wrote:

Do you have code in the after update event of [forms]![startup]![list1] that
will force a requery of the listbox on the SubTopics form?

Something like the following would be needed. Of course, this means that
the SubTopics form would have to be open for this to work without generating
an error.

Private Sub List1_AfterUpdate()
Forms!frmSubTopics!ListSubTopics.Requery
End Sub


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

"franklinbukoski" wrote in
message ...
The following is a sql view of my query:
SELECT Subtopics.Subtopics
FROM [S1 Net Topics] INNER JOIN Subtopics ON [S1 Net Topics].[Topic ID] =
Subtopics.[Topics ID]
WHERE ((([S1 Net Topics].Topic)=[forms]![startup]![list1]));

when I click on an item in a listbox on a form called Startup, I want all
of
the subtopics to show up in another form (in a listbox) called Subtopics.
The criteria i set is not prompting a filter action though. I had it
working
but can't reproduce the desired results.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.