dbTalk Databases Forums  

Form cross-field edits

comp.databases.ms-access comp.databases.ms-access


Discuss Form cross-field edits in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob Alston
 
Posts: n/a

Default Form cross-field edits - 12-01-2004 , 04:10 PM






On a form I developed, I want to do some cross-field dependencies. If
field1 = "xxx" then field2 must be "yyyy" and so forth. Apparently I
cannot do that in field properties via the validation as you cannot
refer to other fields in a form. Right now I am doing these in a
"BeforeUpdate" VBA routing. However, the update continues and the error
message becomes informational - not a "fatal" error.

Anyone have a better way of doing such, especially a way to stop the
update and ensure that the changes get made to the edit rule is passed?

Thanks.

Bob Alston
bobalston9 AT aol D O T com

Reply With Quote
  #2  
Old   
Bob Alston
 
Posts: n/a

Default Re: Form cross-field edits - 12-01-2004 , 05:23 PM






Bob Alston wrote:
Quote:
On a form I developed, I want to do some cross-field dependencies. If
field1 = "xxx" then field2 must be "yyyy" and so forth. Apparently I
cannot do that in field properties via the validation as you cannot
refer to other fields in a form. Right now I am doing these in a
"BeforeUpdate" VBA routing. However, the update continues and the error
message becomes informational - not a "fatal" error.

Anyone have a better way of doing such, especially a way to stop the
update and ensure that the changes get made to the edit rule is passed?

Thanks.

Bob Alston
bobalston9 AT aol D O T com
OK. Found that "beforeupdate" routines have a "cancel" variable
allowing you to cancel the update. Slick.

that allows me to do my complicated edits in a "before update" routine.

Also found some slick code that is a generalized method of producing
error messages for missing required fields. It lists all missing fields
in one msgbox and aborts the update.
See the Message from Dave - a few down in the thread.
http://64.233.167.104/search?q=cache...+message&hl=en

Also he has a syntax error or two but you get the jest.

Bob


Reply With Quote
Reply




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 On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.