473,383 Members | 1,815 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,383 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 1967

<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 the UI and not programatically? Thanks
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 can't change it - I'm writing a script to...
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 referring to that file as well as linked tables. But I...
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 user. While viewing this form the user can click a...
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 /usr/local/php. However, when I set my "error_reporting"...
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 set the values of the parameters and NOT have the...
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 Access 2007. I have a form and subform, the...
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 setting value ? I found code below in this list...
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 it always come out as false. I have tried to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.