473,287 Members | 3,295 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,287 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 2075
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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.