Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using the Tag Property 1

Status
Not open for further replies.

ind

Programmer
Mar 9, 2000
121
US
On a form, I have a command button that opens another form called : frmTypes<br><br>This form is used to enter various types of customers, vendors, job types, ect.<br><br>I need to set the default value of a control to the tag property of the previous form that the command button was on. I have the everything working right, except the default value. Keep in the that I want to open frmTypes from diffrent forms with different tags.<br><br>Any suggestions are greatly appreciated!!!!!!!!!<br><br><br><br>
 
You might want to check out the openargs example for the OpenForm method.
 
elizabeth,<br><br>I'm keeping close. Can you maybe provide me with some sort of example. I need the tag from the previous form to be the default value of a field.
 
Look under help and type in &quot;openargs&quot; to see their example. Where they have the name Callahan, you would instead refer to your control's tag property like this:<br>Me.YourControlName.Tag<br><br>Following their example, pass this to the form that is about to open, then set a variable equal to it, just as they do. <br><br>Then in your 2nd form, set the default value property of your control to this variable in your form's OnOpen event.You might want to &quot;unset&quot; the default when you close the form, too.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top