A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

forms question



 
 
Thread Tools Display Modes
  #1  
Old March 22nd, 2005, 02:04 PM
Lauren B
external usenet poster
 
Posts: n/a
Default forms question

I am attempting to write a code so that when a command button is clicked, a
field in the form is automatically populated.

In the "On Click" event procedure, I want to have code that indicates the
following statement be entered into the field "Coverage Area":

ed^jurisdiction^ALL

I need the jurisdiction part of the statement to automatically be replaced
with the actual jurisdiction of the user. This particular field is located
on another table. The form that contains the command button is actually a
sub form within the larger form that contains the field "jurisdiction."

If everything was on one form, I would use the code:

Coverage Area = "ed^" & [jurisdiction] & "^ALL"

however, how can I refered a field (ie. jurisdication) when it is located on
a different table and essentially a different form?

Thank you very much for any assistance.

LB


  #2  
Old March 22nd, 2005, 02:12 PM
Nikos Yannacopoulos
external usenet poster
 
Posts: n/a
Default

Lauren,

Try:

Coverage Area = "ed^" & Me.Parent![jurisdiction] & "^ALL"

assuming the name of the control on the main form is actually
jusrisdiction; what the field is called in the underlying table is
irrelevant, since the code "reads" the control on the form, not the
field in the table!

HTH,
Nikos

Lauren B wrote:
I am attempting to write a code so that when a command button is clicked, a
field in the form is automatically populated.

In the "On Click" event procedure, I want to have code that indicates the
following statement be entered into the field "Coverage Area":

ed^jurisdiction^ALL

I need the jurisdiction part of the statement to automatically be replaced
with the actual jurisdiction of the user. This particular field is located
on another table. The form that contains the command button is actually a
sub form within the larger form that contains the field "jurisdiction."

If everything was on one form, I would use the code:

Coverage Area = "ed^" & [jurisdiction] & "^ALL"

however, how can I refered a field (ie. jurisdication) when it is located on
a different table and essentially a different form?

Thank you very much for any assistance.

LB


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
General question about naming conventions for forms Mister John Doe Using Forms 1 January 6th, 2005 01:31 AM
Access forms question from a newbie Karl Middleton Using Forms 2 July 14th, 2004 11:27 AM


All times are GMT +1. The time now is 12:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.