Transferring values across forms

S

Sahil

I have a two forms "details" and "timepicker", I want to display a value selected or entered in the form "timepicker" and show it in a textfield in the form "details". Can you please help how do I show a value of a particular form in a different form?
 
G

Graham R Seach

Sahil,

There are numerous ways of doing this, depending on what you're actually
trying to do.

The easiest way is to simply push the value into the target field, from
TimePicker.
Forms!Details!MyTimeField = Me!SomeTimeField

You can also pull the data from TimePicker.
Me!MyTimeField = Forms!TimePicker!SomeTimeField

However, if TimePicker is being used as a dialog box, and especially if you
intend to use it to select a time (I imagine that's what it's for) for
several different forms, then the following approach might be just what
you're looking for.
http://www.pacificdb.com.au/MVP/Code/MyDialog.htm

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

Sahil said:
I have a two forms "details" and "timepicker", I want to display a value
selected or entered in the form "timepicker" and show it in a textfield in
the form "details". Can you please help how do I show a value of a
particular form in a different form?
 
S

Sahil

Thanks for your help. The first method of pushing the value in the target field worked very fine. Yes, as you have guessed the Time picker is being used as a dialog box for selecting date and time. Even tips from the link you gave are very help

Thanks again
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top