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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code help on form!

Status
Not open for further replies.

pfunk

Technical User
May 7, 2007
37
GB
i have a form with a button that opens a subform to enter notes. i have changed the control source on my account_num field on the form to T_Collection_Records.Account_Num because the qry behind it is now linked by account_num?? below is the current code how is it suppose to be now??


Private Sub Enter_New_Notes_Click()
[highlight #FCE94F]MyAccnt = Me!Account_Num.Value[/highlight]
DoCmd.OpenForm "Add New Account Notation", , , "[Account_Num]=''"
End Sub
 
How are ya pfunk . . .

If you put the cursor on the [blue]control source[/blue] property line a combobox arrow will appear. If you dropdown the list (click the arrow) you'll get a listing of all the field names in the query. Understand ... [purple]these are the only names you can [green]legally[/green] give the control source[/purple].

Each control has a [blue]Name[/blue] property ... and [green]it is the name property that VBA uses[/green]! So its possible to have a name property different from the control source!

I can have a control source of "[blue]Now_Is_The_Time_To_Come_To_The_Aid[/blue]" and a [blue]Name[/blue] property of "[blue]NITT[/blue]". [blue]NITT[/blue] is what you'd use in VBA code.

I hope you get the Idea.

[blue]Your Thoughts? . . .[/blue]

See Ya . . .

Be sure to see FAQ219-2884 Worthy Reading! [thumbsup2]
Also FAQ181-2886 Worthy Reading! [thumbsup2]
 
worked like a charm TheAceMan1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top