Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2008

Tip: Looking for answers? Try searching our database.

create query from option group

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
angie - 17 Apr 2008 11:45 GMT
i have a form with an option group (two options). if option1 is selected i
want to create a query named "query1" and delete the previous one. the query
should draw data from another query. if option2 is selected i want to create
again  a query named "query1" and delete the previous one but the query
should draw data from two different queries this time. can i achieve
something like that and if yes how? i would save considerable time
redesigning my database if you help me solve this problem. i assume that code
would be the only way, but i do not have a clue! pls be specific!
KARL DEWEY - 17 Apr 2008 21:03 GMT
You did not say what the purpose of Query1 was to be.   The only reason I can
figure is that both would feed the same form or report.  If this is the case
then there is an easier way.
Create the two queries naming them "X" & "Y" and include a field Expr1: 1
for "X" and a field Expr1: 2 for "Y" selection purposes.  In the criteria for
Expr1 use [Forms]![YourFormName]![Frame1].
Then use both in a union query.  Only the query that Expr1 matches the
option will output records.

Signature

KARL DEWEY
Build a little - Test a little

> i have a form with an option group (two options). if option1 is selected i
> want to create a query named "query1" and delete the previous one. the query
[quoted text clipped - 4 lines]
> redesigning my database if you help me solve this problem. i assume that code
> would be the only way, but i do not have a clue! pls be specific!
angie - 18 Apr 2008 16:33 GMT
query1 returns all records of my table and query2 returns specific records
from my table. what does [frame1] stand for? is that the option group name?
how do i have to put the sql for the union query?

Ο χρήστης "KARL DEWEY" έγγραψε:

> You did not say what the purpose of Query1 was to be.   The only reason I can
> figure is that both would feed the same form or report.  If this is the case
[quoted text clipped - 13 lines]
> > redesigning my database if you help me solve this problem. i assume that code
> > would be the only way, but i do not have a clue! pls be specific!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.