473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Form cross-field edits

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
Nov 13 '05 #1
1 1755
Bob Alston wrote:
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
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Matt | last post by:
Can we click a link and it will submit the form to the other page? Usually we will submit the form to other page by clicking a submit button. Now I need to do the following, but what if I have...
1
by: hmoulding | last post by:
I'm not talking about a bound control. That's something I've already figured out. I have a form that I use to add and update items in a table. Each item can be of one or more types, so there's a...
12
by: TheOne | last post by:
In Asp.net web form under form tag there is action field that I am point to some other page, and not to same web form. When I run this page it is always pointing to itself. How do I get around...
4
by: COHENMARVIN | last post by:
I'm a asp programmer starting out with asp.net. I understand that an asp form can post to its own page and that this allows validation of form fields on the server. But suppose all the controls...
0
by: badboybrown | last post by:
I'm sorry to ask this, but I just can't figure it out and it's probably because it's not possible. I have a Cross-tab query that shows me the sum of items received by brand(Columns) for every...
4
by: Alex Maghen | last post by:
I have a master page which contains a general page framework and also contains a <form runat=server> around most of the content of the page. Inside that <form> tag is a ContentPlaceholder. I...
5
by: superjacent | last post by:
Hope someone can help. I have a saved parent form containing an unbound sub-form. I set the SourceObject (form) after the Parent Form opens/loads. The sub-form (datasheet view) basically...
5
by: dk60 | last post by:
Here is a problem I encountered concerning threads: Here is the code in Form1 button click handler: AddForm addForm = new AddForm(booksDataSet.Titles); Thread addTitleThread=new Thread(new...
11
by: =?Utf-8?B?QWNoaWxsZXNfX19f?= | last post by:
Im finding problem with this code. When i try to display the newindow, its not responding. It does create the new window, but doesnt respond at all. Just stays blank. I'm fairly new to c#(just a...
5
by: MC | last post by:
Hi, I have been looking around for a way to apply the filter that grays out a form or div. I found some examples but the code is pretty complex. Any simple ways to gray that out so I can...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.