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

sending data from popup to main form

I have an app which handles data relating to cattle.
The ear tag number consists of 3 parts. Country code - UK. Farm Code - 107248.
and animal number - 600555.

At present the complete set has to be entered for each animal. I am going to
store the first 2 parts. then when the user tabs into the tagno control a pop up
form has the defaults already there with just the animal number to enter.

The question is how best to gather the 3 parts from the pop up and squirt them
into the tagno of the main form
TIA
David B

Nov 12 '05 #1
1 2230
When I use pop-up forms, I like them to be completely modal - including
suspending all program flow until it has been dealt with. With a little
creativity, the DoCmd.OpenForm allows you to do this.

In the event that the pop-up is opened in use this code

DoCmd.OpenForm 'FormName',acViewNormal,,,,acDialogue, 'Open Argument string'
Select Case SysCmd(acSysCmdGetObjectState,acForm,'FormName')
Case acObjStateOpen
'Form is open but is not visible.
'Add code to reference the controls on it and get the values you
need
Case 0
'Form is closed, do nothing as it was canceled
Case Else
'Form has been put into some mode not anticipated. Handle here
End Select
Use the pop-up's OnLoad event to get whatever defaults you want. I usually
provide an Ok/Cancel set of buttons. Code the buttons to do this..

OK - Me.Visible = False

Cancel - DoCmd.Close

This allows the popup form code to run, while the main form waits for it to
finish before it continues. I do believe even menus are not active during
this.
Once your main form is done getting the data you want, remember to close the
popup form or it will stay open and invisible.

Mike Storr
www.veraccess.com

"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bu**********@newsg4.svr.pol.co.uk...
I have an app which handles data relating to cattle.
The ear tag number consists of 3 parts. Country code - UK. Farm Code - 107248. and animal number - 600555.

At present the complete set has to be entered for each animal. I am going to store the first 2 parts. then when the user tabs into the tagno control a pop up form has the defaults already there with just the animal number to enter.

The question is how best to gather the 3 parts from the pop up and squirt them into the tagno of the main form
TIA
David B

Nov 12 '05 #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...
2
by: Person | last post by:
I have a popup window with a form: The popup window is opened like this: <SCRIPT LANGUAGE=javascript> window.open('primos.html', 'primos', config='height=300, width=400') </SCRIPT> The...
5
by: Hemanth | last post by:
Hello there, I'm running a script that opens a popup window (which is basically a form with checkboxes and a submit button). When I click the submit button I want to run a PHP script and target...
3
by: Iain Miller | last post by:
I'm sure this ought to be simple but I can't make it work!! I have a form (based on a query) that holds information about an individual. Each individual has a Unique reference field called...
2
by: Bill Short | last post by:
Hello All, I have a popup form that is called from a command button on the main form. The main form's data source is tblA. The data source for the popup form is a query that is based on tblA. ...
1
by: R.A.M. | last post by:
Hello, I have written an .aspx page which calls Calendar.aspx page to select birth date which should be assign to some text box control on first page. Here's the code of first page: Birthdate:...
4
by: Macbane | last post by:
Hi, I have a 'main' form called frmIssues which has a subform control (named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs. A control button on the main form opens a pop-up form...
2
by: Bjorn Sagbakken | last post by:
With ASP.NET 2.0 I want to add a nice and sleek feature to my application where the user typical clicks a button to open a smaller window to enable a search, lets say for customers or products...
5
by: Thelma Roslyn Lubkin | last post by:
I am still having trouble trying to use a popup form to allow user to set filters for the main form. The main form is based on a single table. The popup contains 5 listboxes, so the user can...
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: 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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.