Re: Validating "Orders" form
- From: "Arno R" <arraNOcomSPAM@xxxxxxxxxx>
- Date: Tue, 3 Jan 2006 19:23:06 +0100
What is wrong with Rick's idea?
IMO it would be a PITA to write an app in VB6 because of this 'limitation'
You need to know the 'habits' of Access and treat Access like a lady ;-)
I have a similar app and simply check for Order details when I close the Orders form.
If no details ==> the record is deleted. (no confirmation but only a message)
I also check for details before I allow to leave the Record (e.g. navigation)
Also on startup I run a routine to simply delete all OrderRecs without details (without asking)
This is just to make sure ...
You could also use something like a global var to determine the last accessed ordersID.
On current: If no details present with last accessed ID ==> delete that record.
Arno R
"Martin" <0_0_0_0_@xxxxxxxxxxx> schreef in bericht news:7gyuf.51355$6e1.37135@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Anthony England wrote:
>
>> At 'table level' you cannot force an order to have at least one order
>> item - that is, the database table structure allows this. Therefore, you
>> need to restrict how users add a new order.
>
> Understood. That's what I was hoping to do by only allowing a database
> write (to any affected table) upon reasonable verification of minimum order
> requirements. Yes, of course, users will make mistakes (mispellings, wrong
> data, etc.). You should, however, be able to do a little more validation
> than simply saying "oh well, I use a subform so I have to take an incomplete
> order and live with it".
>
>> There is no quick fix for this application, but one technique you could
>> look at is unbound forms.
>
> While I don't have a tremendous amount of experience with Access it is
> starting to seem like it is a royal PITA. Controls that don't work
> properly, ActiveX issues, and this matter of proper UI/data validation being
> a few of the items I've run into so far. I'll continue to explore for a
> little while longer. However, my current sentiment is that it would be much
> more intelligent (and maybe even productive) to use VB6 to manage the UI
> experience with unbound controls and then drive the database with
> significantly improved solidity.
>
> I am astounded that Access does not provide a mechanism to determine if a
> BeforeUpdate event was triggered by intra-form navigation rather than
> form-to-form navigation (among other things). Thinking out of the box for a
> moment, a possible fix might be to write some code to be able to trap
> relevant Windows messages before the form gets them. This would allow
> setting a form-level variable to indicate what the user clicked with the
> mouse or pressed on the keyboard. Checking this variable in
> Form_BeforeUpdate() would then provide a mechanism to intelligently decide
> what to do with the event.
>
> I guess I can compromise and say that I don't have a problem with the table
> corresponding to the "one" side of the form being updated. It would be nice
> to not allow the user to leave the form unless the required "many" side/s
> can be validated to a reasonable extent.
>
> Thanks,
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Martin Euredjian
> eCinema Systems, Inc.
>
> To send private email:
> x@y
> where
> x = "martineu"
> y = "pacbell.net"
>
>
.
- Follow-Ups:
- Re: Validating "Orders" form
- From: Martin
- Re: Validating "Orders" form
- References:
- Validating "Orders" form
- From: Martin
- Re: Validating "Orders" form
- From: Anthony England
- Re: Validating "Orders" form
- From: Martin
- Validating "Orders" form
- Prev by Date: Re: Subvalues -- like submenus? How can I do it?
- Next by Date: Re: Which is best - recordsets/VBA V SQL statements for updating data
- Previous by thread: Re: Validating "Orders" form
- Next by thread: Re: Validating "Orders" form
- Index(es):
Relevant Pages
|