473,805 Members | 1,905 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1995

<el***@ibabysho p.co.uk> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.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***@ibabysho p.co.uk> wrote in message
news:11******** **************@ z14g2000cwz.goo glegroups.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
9926
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
7257
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 automate a process on an existing system. Jim Witte jswitte@bloomington.in.us
11
10290
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 don't understand what will happen when I distribute my front-end to some other PC. How will Access know where is File DSN ? Is there any way that I set the connection programmatically. For example, some login form with neccessary informations ?...
1
3680
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 search button that will let them review "CLOSED" or "SUBMITTED" items using the same form. I call a stored procedure to get the results of their "Search" and try
1
6513
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" setting to be "E_ALL", notices are still not getting reported. The perms on my file are 664, with owner root and group root. The php.ini file is located at /usr/local/lib/php/php.ini. Any ideas why the setting does not seem to be having an effect? ...
5
5314
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 user prompted for them). Based on a Microsoft page (http://support.microsoft.com/kb/287437), I tried the following approach: Private Sub Report_Open(Cancel As Integer) Dim sql As String
0
1790
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 underlying tables have a one-to-many relationship. The recordsource of both the main form and the subform are set in VBA
8
16100
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 which modifies Application setting section but how to add new item to userSettings ? Andrus.
7
1740
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 change the setting from string to Boolean but no help.
0
9596
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
10609
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
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...
0
9185
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...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
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
5542
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
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
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

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.