By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,693 Members | 1,803 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,693 IT Pros & Developers. It's quick & easy.

Setting Value in an Open Form

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a

<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

P: n/a
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

P: n/a

<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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.