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

formating code in access

Status
Not open for further replies.

etcrier

Programmer
Sep 20, 2006
60
0
0
US
I am trying to use the build event by RC on a field of a form.
when the window comes up i get lots of options to click on that will build a command line for me.

I need to understand the syntax of entering information.i need the syntax of the following when a field is changed.
I have a form = main_etc, it has a table called lnnnet, the table has a date field called paidto.
I also have on this main form a subform called =payment_entry, it has a table called payment, the table has a field called date_to.

when data is entered into the date_to field I want to populate the same information in the paidto.
in other words
FORM TABLE FIELD SUB-FORM TABLE FIELD
main_etc!lnnnet!paidto = payment_entry!payment!date_to

what would syntax for this be in a line of "after_update"
or what ever

thanks so much
 
How are ya etcrier . . .

Try this:
Code:
[blue]Forms![purple][b][i]MainFormName[/i][/b][/purple]!paidto = Me!date_to[/blue]

For reference see: Refer to Form and Subform properties and controls

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
PERFECT - thanks

followup -why does access not give you syntax help when you click on build event. i have tried every combo of clicking and i never get "me." or Forms!. it leads you to believe that it will format the code correctly.

Calculations of fields on a form do not seem to need the prefix of form and form name or me as long as you are inside a single form or subform.


thanks again
you made my day
 
why does access not give you syntax help
You may follow the Expression builder (loaded forms).

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
etcrier . . .

The builder simply puts all code components at your finger tips. You still have to know what your doing!

Fuller explanations of these components are provided in VBA and/or access help, and there's an easy way to get the explanations you seek!
[ol][li]Open any code window and enter [blue]DoCmd.OpenForm MsgBox InStr[/blue]
Put the cursor on any of the words and hit [blue]F1[/blue][/li]
[li]Open any form in design view.
Pun the cursor on any property or event line and hit [blue]F1[/blue][/li][/ol]
Its called [blue]Context Sensitive Help![/blue] [thumbsup2]

In any event remember there are two help systems in access and explore more often.Although they're not the best they're not bad either. Add [blue]Context Sensitive Help[/blue] and well . . .

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

BTW: I notice you've been a member since Sep 21, 2006. Do have a look at one of the links at the bottom of my post. You'll find worthy reading here as well as insite into etique here in the forms . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thanks
I did not know about the F1

your comment implied i might have been asking questions incorrectly? I am sorry for that. I jump into and out of access and as last hope i do a post to the forum. I'll do the reading you suggested but i thought I was detailing the question in a polite and considerate manner. i do really appreciate peoples help that post answers.

cheers

David
 
etcrier . . .

Do not feather yourself! From your profile you appear to be new. I just thought I'd mention something worth reading . . . (you may already have) . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top