472,328 Members | 1,103 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,328 software developers and data experts.

Setting Value in an Open Form

I'm currently developing a Fleet system which enables the user to enter
Parts used to Service a vehicle. The parts are available through a
Combo Box on a form and if the user enters a new Part the systems
checks the NoinList and then opens a new Form where the user can enter
the new Part Details i.e. price, VAT Rate, Supplier etc.

What I'd like is for the value entered in the Combo box for the new
part e.g. Fuel Filter, to appear in the Part entry form as the default
for the Part Description i.e. the newdata string.

Is this possible ?

Thanks for your help,

Elfyn

Nov 13 '05 #1
4 1866

<el***@ibabyshop.co.uk> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I'm currently developing a Fleet system which enables the user to enter
Parts used to Service a vehicle. The parts are available through a
Combo Box on a form and if the user enters a new Part the systems
checks the NoinList and then opens a new Form where the user can enter
the new Part Details i.e. price, VAT Rate, Supplier etc.

What I'd like is for the value entered in the Combo box for the new
part e.g. Fuel Filter, to appear in the Part entry form as the default
for the Part Description i.e. the newdata string.

Is this possible ?

Thanks for your help,

Elfyn


You could simply re-query the combo and then set its .value property to the
newdata string. However, you need to consider the case where the user
starts to enter a new part but then changes his mind - perhaps you could use
two buttons OK and Cancel and only if the OK button is pressed do you save
the new part, requery the combobox, set the value to the new part number,
then close the popup form.

PS getting feedback is what keeps people donating their time for free - you
didn't say whether your subform post had pointed you in the right direction.
Nov 13 '05 #2
Thanks for that Justin,

But how do I get the value of the combo box into the description field
of a pop-up form ?

Nov 13 '05 #3

<el***@ibabyshop.co.uk> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Thanks for that Justin,

But how do I get the value of the combo box into the description field
of a pop-up form ?


One easy way is to use the form's OpenArgs property, and specify it when you
use DoCmd.OpenForm. In this way, whenever the form is opened you look to
see if there is a new part given in the OpenArgs. If there is then it means
the user wants to add a new part, so you can start a new record and set the
part number (or whatever you supply) on the parts form.
You can look in the help file for OpenArgs, but if you still need help, post
back.
Nov 13 '05 #4
Ola E:

One oddball thing to be aware of is that the code generated by the
Access 2K button creation wizard places the .OpenArgs argument in the
wrong place. In Access 2k, the .OpenArgs value is actually the 8th
argument to the DoCmd.OpenForm command. The intellisense gets it
right.

King Ron

Nov 13 '05 #5

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

Similar topics

21
by: | last post by:
Hi, I am setting the NumericUpDown .Value property and the ValueChanged event is NOT being fired. Does this ONLY get fired when I change it on...
2
by: Jim Witte | last post by:
Hi, How do I set a file input element? If it's a text input, I can set the value property. But this doesn't work with file inputs. And no, I...
11
by: Zlatko Matić | last post by:
Hello. I have a MS Access front-end working with PostgreSQL database. I have successfully created saved File DSN. My paa-through queries are...
1
by: ZRexRider | last post by:
Hello, I have an MS-Access 2003 (ADP) project that uses SQL2000. I have a form that displays all "OPEN" items associated with a particular...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to...
5
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to...
0
by: iceborg | last post by:
Greetings, I have an application that was originally designed in Access 2000. It has been transformed to Access 2002 (XP), Access 2003, and now...
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing...
7
by: PetterL | last post by:
I have a setting called My.settings.firstrun set to True, set in the setting manager. When i read this in the first form form_Load in a IF sentence...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
1
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.