Re: Microsoft Access, Double Data Entry and breaking the Normalization rule



"hippomedon@xxxxxxxxxxxxxx" <hippomedon@xxxxxxxxxxxxxx> wrote in
news:1180540025.677581.252670@xxxxxxxxxxxxxxxxxxxxxxxxxxx:

Currently the db is set-up with option 2 (two records in same
table).
This works very well for validation purposes, when the validation
is done after the entry. The VBA code that I developed easily
compares Entry 1 to Entry 2 and generates an output. However, for
instantaneous validation, it does not work as well. This is the
main reason I'm considering switching to option 1. I think it
would allow for an easier and more instantaneous comparison of
entry 2 to entry 1. It should actually only add 2 fields to each
record (one for the response, and one to record the time of
entry).

I don't see why you can't load the other record in a recordset and
compare the values field by field when they are entered into the
other table. That would be just as easy as comparing to a different
field. You'd do it something like this in the BeforeUpdate of the
control:

If Nz(Me!ControlName) <> Nz(rs(Me!ControlName.ControlSource)) Then
...

You could also write a function that uses Screen.ActiveControl to do
it, which makes it easy to assign to all the controls (in the above,
replace Me!ControlName with Screen.ActiveControl).

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
.



Relevant Pages

  • Re: I want to make a Controls Events Fire using code
    ... that does not take place now, and the entry goes unnoticed. ... I have no idea about what you mean in the phrase "Validation Event". ... It's not an event associated with any Control, Form, Report or Query ... I have a date control and am using a calender form button to fill ...
    (comp.databases.ms-access)
  • RE: new values
    ... if your data is layed out as below and you enter each month, this fomula ... will pick the last entry in the row....... ... I am trying to setup a formula where the formula picks up the information ... compares it to another cell... ...
    (microsoft.public.excel.misc)
  • Validation to ensure certain day of week
    ... Hi, I'm fairly new to Access, and I'm trying to put a validation ... control in to ensure that a date entry can only be a fixed day of the ... If anyone could explain how to do this I would be most grateful. ...
    (comp.databases.ms-access)
  • Re: Repost: DoCmd.RunCommand acCmdDeleteRecord does nothing.
    ... If you are seeing that error, it must be due to the fact the the control ... currently contains an invalid or unacceptable entry (such as an incomplete ... to delete a record with a required field set to null, ... DoCmd.RunCommand acCmdDeleteRecord ...
    (microsoft.public.access.formscoding)
  • Re: Problem with Return Value from a Function
    ... The function reference transfers control to a function procedure; the function procedure returns control and a value, which replaces the function reference in the evaluation of the expression. ... ENTRY variables cannot be returned unless they have the LIMITED attribute. ... The CALL statement can be used to invoke it only if the returned value has the OPTIONAL attribute. ...
    (comp.lang.pl1)