473,395 Members | 1,497 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Search Dailog Window opening another Dialog Window instead of a Report

Hi,
I want to have a Search Dialog box that has several text box and
fields to build a search and display the results in a form. I can do
everything that I need to if I us a report but I would like to have
the search from data displayed in a form.

The structure that I have for this was take from the Asset Manger from
MS. Anyway I open a report that in turn opens up a search form that
allow me to select data. Then you continue by clicking a button that
passes the data to a query that is used by the report.

If I use a form to do the same thing it seem to process the query for
the display form before it displays the search form.

Is there anyway to have a search form open another form and specify
what query info is searched for?

Thank You
Norris.
Nov 12 '05 #1
1 2083
Yes, you can display a "search form" and collect criteria for use in an
underlying form. In one of my applications I have a dialog for selecting
which company's inventory,invoices,POs, etc that the user wants to view. I
did it this way(not the only way).

Set up a call to open your search form in the open event of the underlying
form. This call should be modal(meaning as long as the form is open all
processing stops on the code in the underlying form) so you want the
"WindowMode" to be dialog.

Example:
DoCmd.OpenForm _
FormName:="frmMySearchForm", _
View:=acNormal, _
WindowMode:=acDialog

The user enters their criteria in the search form, and you use it to set the
filter property of the underlying form, like so:
forms![MyForm].FilterOn = False
forms![MyForm].Filter = "MyField = " & Me.MyList.Value
forms![MyForm].FilterOn = True

The example I am giving only uses one criteria, you can use more than one
and define the criteria and concatenate on the extras with "AND/OR" very
similar to writing a SQL where clause. There are a lot of posts about using
more than one criteria in the filter/wheremode of a form or report, you can
google for them if you are stumped. Doing it this way enables you easily
change the criteria without closing the underlying form. You can put a
button on the underlying
form and recall your search form, enter new criteria and change the filter
property.

Another method would be simply open the search form first, select your
criteria and pass them in the command for opening the form by setting the
"WhereCondition"

Example:
DoCmd.OpenForm _
FormName:="MyForm", _
View:=acNormal, _
WhereCondition:="MyField = " & Me.MyList.Value

Sorry for the wordy response. HTH
--
Jeffrey R. Bailey
"N. Graves" <ng*****@yahoo.com> wrote in message
news:k3********************************@4ax.com...
Hi,
I want to have a Search Dialog box that has several text box and
fields to build a search and display the results in a form. I can do
everything that I need to if I us a report but I would like to have
the search from data displayed in a form.

The structure that I have for this was take from the Asset Manger from
MS. Anyway I open a report that in turn opens up a search form that
allow me to select data. Then you continue by clicking a button that
passes the data to a query that is used by the report.

If I use a form to do the same thing it seem to process the query for
the display form before it displays the search form.

Is there anyway to have a search form open another form and specify
what query info is searched for?

Thank You
Norris.

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: BlackHawke | last post by:
Our program, game program Andromeda Online (www.andromedaonline.net) uses two programs- one to play the game, another to patch the game as updates come out. Players actually launch the updater...
6
by: chon | last post by:
I have an ASP page that is sent a file location as a parameter. It opens this file, loads the ADODB.Stream object and does a binary write to the page forcing the download dialog to appear. This...
3
by: Russell | last post by:
I have a quirky issue that I believe involves timing and only 2 hairs left to pull. I have a modal dialog that is an IFrame. The IFrame contains another window - which contains the appropriate...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
2
by: Viks | last post by:
Hi everyone, I am beginner at javascript.One of the web applications that i am currently developing,requires to upload file from the client side to the server.The condition being that the file...
1
by: Curious Trigger | last post by:
Hi there, programming with Visual Studio 2005 and ASP.NET 2.0 I want to open a modal dialog from Default.aspx. I searched the net and many newsgroups but I couldn't find any solution. First I...
2
by: =?Utf-8?B?TGVuaTIwMDA=?= | last post by:
Hi, I would like to write a c# application. to detect if a modal dialog opens on another application, (e.g. notepad.exe save changes dialog when you click exit ) and auto cancel it. How do I detect...
1
by: Ramachand | last post by:
Actually I have to call a dialog window "Dwin1" from a Parent Window. From Dwin1, I have to call another Dialog Window "Dwin2".if user close the Dialog Window "Dwin2", i have to refersh the Dwin1....
3
by: premMS143 | last post by:
Hi, I' developing a VB application. When user clicks on 'Tools' option from the Main Form, a dailog box will appear, which is developed using another VB form itself. But while the dailog box is...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.