×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Form/subform design question

Form/subform design question

Form/subform design question

(OP)
Hi again,

I know how to do most of the following, but I want to ask how do the experts (you) handle this?  I’ve run into headaches trying to back-out some of my newbie baby steps (fortunately I’m the user for now) and I’m trying to avoid this in the future.

When you are designing a form/subform (header/line item) with complicated validations that happen after the end of the last line item entry.  Do you:

1) Enter items on the fly & back out the entries if they fail the validations.  My intuition says no to this, but there may be good reasons I’m missing.

2) Place you header & line items into a buffer table & only move them over, en masse, to the real tables if all criteria are met. Maybe, seems straight forward to program but maybe there are good reasons to avoid this.

3) Use a system of memory buffers & then move header & line items, en masse, into tables if criteria are met.  This seems to be the best but then again it may wind to be a real bear to program or am I over estimating the work involved in making this solution look like #2.

rafe

RE: Form/subform design question

The before update event of the Form is entered prior to updating the record, put your validations in this event.

RE: Form/subform design question

(OP)
one vote for option #1

or am i not understanding your answer.  because if the validation fails (after the entry of the last line item record), i don't want the header record or any of it's linked line item records in the database.

RE: Form/subform design question

I use this type of approach to an order form with an order  details subform.
I work with Access as the front end to SQL7.

The main order form is an unbound form.(the user fills in a blank form for new entries, or code is used to load the form with existing data for editing orders)

The details subform is bound to a local table. When the user clicks save, I run my business rules test and if the results are ok, the information from the main form is saved to the order table and the order details are added to the detail table. (any changes to the details section of an existing order require all old details to be deleted, and replaced with the new line items)

This prevents any data from being entered into the final tables untill the rules are satisfied.

Need help? Just ask!

John

John A. Gilman
gms@uslink.net

RE: Form/subform design question

(OP)
John,

Thanks!  Sounds like your DB is much more advanced than what I'm doing.  Just to clarify, your "local table" is an Access buffer table on the front end system & the "final tables" are the in the DB on the server system?  You're doing an advanced version of option #2.

I'm to that awkward stage as a newbie where I can figure out how to do most things... but just because I can do it doesn't mean that I should!  Which is why advice like this this is a big help; design it right the 1st time & minimize rewrites.

thanks again

rafe

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close