473,396 Members | 1,921 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,396 software developers and data experts.

Basic PopUp Search Form

I am in the process of eliminating too many ComboBoxes used for
searching. My MainForm will have a Button that will launch a PopUp
Search Form. This SearchForm is a continuous form that has 7-Fields
displayed, and the user can click on any field label to change the
order of the records. This all works.

How do I code to have the MainForm display the record that the user
clicked on in the Popup SearchForm. I am currently trying the approach
that follows, but maybe there is a better way ???

txtDmySearch ' Hidden text box on the mainform.

Private Sub cmdSearch_Click() '
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FS-SEARCH"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
With Me.Recordset.Clone
.FindFirst "[SrvID] = " & Nz(Me.txtDmySearch)
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With

Thanks Greg
End Sub

Apr 1 '07 #1
1 3865
On Mar 31, 8:58 pm, "ApexD...@gmail.com" <ApexD...@gmail.comwrote:
I am in the process of eliminating too many ComboBoxes used for
searching. My MainForm will have a Button that will launch a PopUp
Search Form. This SearchForm is a continuous form that has 7-Fields
displayed, and the user can click on any field label to change the
order of the records. This all works.

How do I code to have the MainForm display the record that the user
clicked on in the Popup SearchForm. I am currently trying the approach
that follows, but maybe there is a better way ???

txtDmySearch ' Hidden text box on the mainform.

Private Sub cmdSearch_Click() '
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "FS-SEARCH"
DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog
With Me.Recordset.Clone
.FindFirst "[SrvID] = " & Nz(Me.txtDmySearch)
If Not .NoMatch Then Me.Bookmark = .Bookmark
End With

Thanks Greg
End Sub
So where do you use the information from the popup?

Here is one approach:
1) Don't close the popup, just hide it.
2) Then something like this:
dim f as form
set f=forms (stDocName)
3) then, use the control from the stDocName form in the .FindFirst.

Don't forget to close f using this approach.

-- Larry Engles

Apr 1 '07 #2

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

Similar topics

3
by: nadia | last post by:
Is it possible to do the following in php: I want to have a main form open. In the form I want a button that will open a popup window so the user can search for something. The user can then select...
1
by: TErnst | last post by:
Hello All.... What I am attempting to do is have a link/button on a page (testpopup.cfm) that opens a popup page (popupwindow.cfm). The popup page displays a resultset from a query and the...
1
by: noone | last post by:
I'm making a sales order database similar to Northwinds but with a slightly different form. The tables are the same. The 'Sales Orders' form has a 'Line Items' subform. I've added a 'Add Item'...
12
by: Mark Fox | last post by:
Hello, I am attempting to do something very simple. I have a page MainPage.aspx and a popup window Popup.aspx. When users click on the linkbutton in the popup window I am looking to do some...
2
by: tao lin | last post by:
Hi, all I am using VS2003 under WinXP. My WebApp has a WebForm which has a html form has some search condition textbox, once the user fill in the condition and click submit button. My app will...
4
by: Q. John Chen | last post by:
I have a "Delete" button on WebForm, but I want to popup a warning message with OK and Cancel in case user clicked the button by accident. HOW?
7
by: jim Bob | last post by:
Hi, This is probably very simple to do so if anyone can point me to the right place for reading, it would be much appreciated. I just want to build a very basic search form where i can enter a...
2
by: VMI | last post by:
I have a LinkButton_search on my Page1.aspx that opens up a popup page called popup.aspx. I do this with LinkButton.Attributes.Add() on the Page_Load of Page1.aspx. How can I add server-side code...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.