Auto generate name from another table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to have a name displayed automatically when tou open a new
form with a command button.
Example. I have a client list and I already programmed the command button to
open up a comments form but when I hit the button I do not want to have to
put the name in again I want it to be there when I open up the new form is
that possible and how?
 
Yes,

You indicate that you already have a name, where did you get the name from,
where do you want to put it in the new form?

If you are actually opening a new form, I would think the only place where
you might want to put the same "name" would be in a combo box or something
like that. I that is the case, you could pass the pass the form the OpenArg
parameter when you use the OpenForm method. Look this up in help for an
example. If that is not what you are looking for, post back with a little
better explaination of what you are trying to do.

HTH
Dale
 
You can pass the value using the OpenArgs in the open form command line

Docmd.OpenForm "FormName" , , , , , , Me.[TextBoxName]

In the OnLoad event of the second form, assign the OpenArgs value to the
right text box

Me.[TextBoxName] = Me.OpenArgs
 
hey, ofer! Check the Forms room. There is a message there specifically for
you I think you will want to respond to.

--
Dave Hargis, Microsoft Access MVP


Ofer Cohen said:
You can pass the value using the OpenArgs in the open form command line

Docmd.OpenForm "FormName" , , , , , , Me.[TextBoxName]

In the OnLoad event of the second form, assign the OpenArgs value to the
right text box

Me.[TextBoxName] = Me.OpenArgs

--
Good Luck
BS"D


SLevell said:
Is it possible to have a name displayed automatically when tou open a new
form with a command button.
Example. I have a client list and I already programmed the command button to
open up a comments form but when I hit the button I do not want to have to
put the name in again I want it to be there when I open up the new form is
that possible and how?
 
Back
Top