473,804 Members | 3,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using a Button to Open a form and Set a Default Value

Del
I have a form call frmMMD-PCKR. This form has seven buttons, each
button represents a part. When I click on any of the buttons they open
another form called frmTallyTagMMDP CKR.

On the frmTallyTagMMDP CKR form I have a text box called TTPartNbr

What I want to do is when I click on the button I want to set the
default value of the TTPartNbr text box.

Example:

One of the buttons is labeled 2955BLUE so when I click on that button
I want the the frmTallyTagMMDP CKR form to open and have the TTPartNbr
text box set to 2955BLUE, and if I click on the 2955RED button I want
the frmTallyTagMMDP CKR form to open and the TTPartNbr text box to be
set to 2955RED.

Thanks for any advise...

May 10 '07 #1
2 5333
Hi,
In the 'OnClick' event of the button on frmTallyTagMMDP CKR I assume
you have code that says Docmd.OpenForm "frmTallyTagMMD PCKR" if so,
you can do it two ways;

add a line of code after the 'Docmd' which would be(or close to this)
Forms!frmTallyT agMMDPCKR![TTPartNbr]="2955BLUE"

or you can pass the value you want TTPartNbr to be as an 'OpenArgs'
ex; Docmd.OpenForm "frmTallyTagMMD PCKR",,,,,"2955 BLUE"
then in the OnOpen event of frmTallyTagMMDP CKR you can set TTPartNbr
ex; me.TTPartNbr = Me.OpenArgs

hope it help
bobh.

On May 10, 3:14 pm, Del <dtl...@gmail.c omwrote:
I have a form call frmMMD-PCKR. This form has seven buttons, each
button represents a part. When I click on any of the buttons they open
another form called frmTallyTagMMDP CKR.

On the frmTallyTagMMDP CKR form I have a text box called TTPartNbr

What I want to do is when I click on the button I want to set the
default value of the TTPartNbr text box.

Example:

One of the buttons is labeled 2955BLUE so when I click on that button
I want the the frmTallyTagMMDP CKR form to open and have the TTPartNbr
text box set to 2955BLUE, and if I click on the 2955RED button I want
the frmTallyTagMMDP CKR form to open and the TTPartNbr text box to be
set to 2955RED.

Thanks for any advise...

May 10 '07 #2
Del
On May 10, 4:04 pm, bobh <vulca...@isp.c omwrote:
Hi,
In the 'OnClick' event of the button on frmTallyTagMMDP CKR I assume
you have code that says Docmd.OpenForm "frmTallyTagMMD PCKR" if so,
you can do it two ways;

add a line of code after the 'Docmd' which would be(or close to this)
Forms!frmTallyT agMMDPCKR![TTPartNbr]="2955BLUE"

or you can pass the value you want TTPartNbr to be as an 'OpenArgs'
ex; Docmd.OpenForm "frmTallyTagMMD PCKR",,,,,"2955 BLUE"
then in the OnOpen event of frmTallyTagMMDP CKR you can set TTPartNbr
ex; me.TTPartNbr = Me.OpenArgs

hope it help
bobh.

On May 10, 3:14 pm, Del <dtl...@gmail.c omwrote:
I have a form call frmMMD-PCKR. This form has seven buttons, each
button represents a part. When I click on any of the buttons they open
another form called frmTallyTagMMDP CKR.
On the frmTallyTagMMDP CKR form I have a text box called TTPartNbr
What I want to do is when I click on the button I want to set the
default value of the TTPartNbr text box.
Example:
One of the buttons is labeled 2955BLUE so when I click on that button
I want the the frmTallyTagMMDP CKR form to open and have the TTPartNbr
text box set to 2955BLUE, and if I click on the 2955RED button I want
the frmTallyTagMMDP CKR form to open and the TTPartNbr text box to be
set to 2955RED.
Thanks for any advise...- Hide quoted text -

- Show quoted text -
Thanks for the input.
I'll give both a try.

May 10 '07 #3

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

Similar topics

5
2295
by: TrvlOrm | last post by:
Can any one please help me...I am new to JavaScript and I have been struggling with this code for days now and can't figure it out. I would like to get the Buttons to correspond with the action to either a) generate numbers b) Prompts a user to locate a web page c) go to previous page in history list d) Loads next page in history list e) Promps the user for a URL and loads the web page in a new window f) and Re-Sizes the window. ...
3
24039
by: Random Person | last post by:
Does anyone know how to use VBA to relink tables between two MS Access databases? We have two databases, one with VBA code and the other with data tables. The tables are referenced by linked tables in the database where the code resides. If we move the database with the data tables to a new directory, the links are no longer valid. I tried to update the links by changing the Connect property and refreshing: Set td = db.TableDefs(0)...
1
4013
by: Daveyk0 | last post by:
Hello there, I have a front end database that I have recently made very many changes to to allow off-line use. I keep copies of the databases on my hard drive and link to them rather than the live databases on the network. Is there a way, via code, when I get back in-house from being on the road to click a button, and select the backends I want to link to? I would want to delete all the current links and link to the "live"
0
6442
by: Michelle Keys | last post by:
I am trying to call a print function to print a string from a database using javascript. Which is RC_DATA of Varchar2(2500). This is a javascript is not being used. I have a thing that needs to be modified: if(e.CommandName =="Print") { string parsedreceipt = null; parsedreceipt = DecodeReceipt (e.Item.Cells.Text); Session = parsedreceipt;
1
6432
by: ratnakarp | last post by:
Hi, I have a search text box. The user enters the value in the text box and click on enter button. In code behind on button click i'm writing the code to get the values from the database and binding it to a repeater control. This repeater control has multiple text boxes and buttons. Can you please tell me how can i do paging in this case ? I'm posting my code below. The problem is that if i click on "AdjustThisAd" button, it opens...
9
2790
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT IS IMPOSSIBLE TO PROGRAMMATICALLY ADD A BUTTON TO A DYNAMICALLY CREATED PAGE. Or, to be more precise, why it is impossible to have an onClick sub respond to that button’s Click event. My main page has only one line:
6
5174
by: =?Utf-8?B?U2hhd24gU2VzbmE=?= | last post by:
Greetings! I was researching AJAX to provide a solution to displaying status messages while a long process executed. I found several examples online and was able to use their code to get a quick application working. However, when attempting to implement the solution, the AJAX calls weren't updating the screen like the examples were and seemed not to fire until after the long running process had completed. I found the only real...
17
7852
by: DeZZar | last post by:
Hi all, I need to regularly backup my database as an Excel file and have been using the File Export option. Problem is I need anyone using the database to be able to do this easily - nopt just me. For all users the database is hidden and only a menu screen is visable. Can I create a button on my menu screen that will export a table >
0
9576
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10323
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10311
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9138
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6847
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5516
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5647
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4292
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2988
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.