Re: Validating "Orders" form



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"
>
>
.



Relevant Pages

  • RE: GetWindowsDirectory retrieves wrong directory under Terminal S
    ... We use the same api in VB6, I created a simple VB6 DLL and referenced it ... from my C# test app and also a VB6 test app. ... applications and needs to read the legacy application's INI file from the ... mapped to a Windows folder within their profile. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: General question about upgrade path
    ... While the app does just about everything I want it to, ... > wasn't worth the hassle of upgrading. ... Do I need to move to VB6? ... There is a close analogy between the Coke snafu 20 years ago and MS's ...
    (microsoft.public.vb.general.discussion)
  • Re: Advice Needed...
    ... items in a listbox). ... What about access controls is better? ... looking) is that they can handle multi-column data, where a VB6 listbox ... The only real issue is the problems when an app shuts down unexpectedly. ...
    (microsoft.public.vb.general.discussion)
  • Re: Hows dot.net doing nowadays?
    ... There are things that VB6 will forever be better suited for than a .NET app. ... why is it that 8 of 10 .Notters will quote something out of context so they can twist its meaning? ... If some one is moving to .NET, or if the reason some one changing ANY platform is simply because it's the fashionable thing to do for the week, then it's a bad decision. ...
    (microsoft.public.vb.general.discussion)
  • Re: Possible to distribute without dotnet framework?
    ... have to explictly select this bloated install wich nobody does if he ... chance is even higher that the framework is not installed if the company ... AFAIK you can use DirectX in VB6 so i do not get your point ... XCopy a VB6 app? ...
    (microsoft.public.dotnet.languages.vb)