473,500 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Open form w/ input from cbo on other form?

8 New Member
I know this is probably on the forum somewhere I was unable to find a solution because I didn't really know how to search for it. I have a form that has a combo box on it. The user types a # in the combo and if the number doesn't exist in the record source it asks the user if they would like to create a new record. If the user clicks yes a form frmEnterVet opens for them to enter the new record. What I would like to do is take the value that was typed in the combo box cboVetSearch and have the form frmVetSearch open to a new record with that value in the VetSSN field. I have the form opening but I can't get it to point to a new record with that value.
Jun 9 '08 #1
1 1315
janders468
112 Recognized Expert New Member
One way to do this is to pass the value you need to the openargs parameter of the form you are opening. Once the form is open you can script the append however you want. One way would be (assuming your form is data bound) is to put the following line of code in the on open event of the relevant form:

DoCmd.GoToRecord acDataForm, Me.Name,acNewRec

And then set the relevant control to the value of the opened form's openargs

That's a quick and dirty way, not necessarily the most elegant but it should give you some ideas.
Jun 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
25003
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or...
2
7612
by: monika | last post by:
Hi all... I am able to select a student's story and open it in a word doc. the teacher then corrects the story, highlight in colors the comments, strikethrough. In fact all the privileges I...
12
3498
by: Matt | last post by:
I want to write a ASP page to open/download a file In fileview.jsp, I have the file browse, and when user click submit button, fileview2.asp should open the file. fileview.asp ============...
8
2399
by: alanstew | last post by:
With the body tag calling out 'window onload', a function with a 'window.open' fails at the 'window.open' line. If I cut out the body tag, the function executes as normal. At first I thought it...
1
1878
by: Marshall Dudley | last post by:
I have a page where there are multiple submit buttons, some load the next page in the same window to continue, and some need to open the page in a popup for additional information. Therefore I...
8
10731
by: lauren quantrell | last post by:
When I open an Access form I can have no recordset specified, then in the form's OnOpen event I can do something like: Me.paramaters = "@SomeColumn = 22)" Me.recordsource = "dbo.sproc123" But I...
7
3684
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
4
8140
by: jwlum | last post by:
I have the following problem under Internet Explorer only: 1. User fills out form data (myform.php) and clicks a button that fires myFunction() 2. myFunction() spawns a "hello, world" popup page...
3
22021
by: siyaverma | last post by:
i am trying to upload csv file from user's computer to main server the code i am using is if(((isset($_GET)) && ($_GET=="yes")) ) { $typefield = $_GET; echo...
4
5862
by: RLN | last post by:
RE: Access 2003 I have a SQL variable (strSQL1 dimmed as String) that gets built using Select Case logic. The first half of strSQL1 is etched in stone no matter what. The 2nd half of strSQL1...
0
7136
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
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6906
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
7397
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...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
672
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.