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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Field referencing - Continous Form



 
 
Thread Tools Display Modes
  #1  
Old May 27th, 2010, 10:18 PM posted to microsoft.public.access
stu
external usenet poster
 
Posts: 134
Default Field referencing - Continous Form

How do you reference a specific field for update on a continous form?
Suppose I have three fields: ID, F1, F2 and the continuous form may have 20
records. If a user double clicks on F1, I want to place an "X" in field F2
for a subset of the 20 records based on the values in F1. Could someone
provide a code snippet to put an "X" in F2 if F1 has a certain value like
"ABC"?

  #2  
Old May 28th, 2010, 04:32 AM posted to microsoft.public.access
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default Field referencing - Continous Form

On Thu, 27 May 2010 14:18:22 -0700, Stu
wrote:

You could run an Update query. Create this query something like:
update myTable
set F2="X"
where F1="ABC"

Then in F1's DoubleClick event, write:
Currentdb.Querydefs("myQuery").Execute dbFailOnError
(of course you replace myObjectNames with yours)

To show the changes to the underlying table, you may have to requery
the form:
Me.Requery

-Tom.
Microsoft Access MVP



How do you reference a specific field for update on a continous form?
Suppose I have three fields: ID, F1, F2 and the continuous form may have 20
records. If a user double clicks on F1, I want to place an "X" in field F2
for a subset of the 20 records based on the values in F1. Could someone
provide a code snippet to put an "X" in F2 if F1 has a certain value like
"ABC"?

 




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


All times are GMT +1. The time now is 11:26 PM.


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