Re: Avoid duplicate combinations

From: Bruce (anonymous_at_discussions.microsoft.com)
Date: 07/01/04


Date: Thu, 1 Jul 2004 10:59:20 -0700

Thanks for the reply. If I understand correctly the
process you outlined, I will receive a messge when I
attempt to move to a new record. The problem is that the
entire form has been completed before there is an
indication that something is wrong. Further, the message
advising of the error provides no details, as I recall.
I would rather avoid if at all possible the use of a
combined field primary key. I am worried about what would
happen to relationships if there is a data entry mistake
that needs to be corrected later. Thanks again for taking
a look at the question.
>-----Original Message-----
>Bruce: I just answered your second question this morning
in a post someone
>else had placed. Read the following and modify to meet
your needs...
>
>----------------------------------------------------------
----------------
>You can set a key field in the table of USERID&DATE and
not allow
>duplicates.
>
>To do so, go into design view for the table. Click the
IserID and the Date
>fields (you can hold CTRL while clicking). Then click
your "key" icon at
>the top of the screen.
>
>If you point your cursor to the table's title bar and
right click, you will
>get a menu that includes an "indexes" icon. Clicking
that will allow you to
>modify some of the key properties.
>
>rick B
>
>
>
>
>"Bruce" <anonymous@discussions.microsoft.com> wrote in
message
>news:2492201c45f85$d8a18690$a501280a@phx.gbl...
>I have a table (tblMain) with text fields for
>[DocumentNumber] and [Revision]. On the form (frmMain)
>these fields are the Record Source for text boxes
>txtDocNum and txtRev. I would like to enter "0404" in
>txtDocNum and have it appear as "Form 04-04". Is this
>accomplished by formatting the table field, the text box,
>both, or neither?
>Next question: It is OK to have the same Document Number
>twice, but not with the same revision. There can be only
>one record for Form 04-04 Rev. A, one for 04-04 Rev. B,
>etc. How can I trap a duplicate as soon as the Revision
>is entered into txtRevision (or when leaving the control?
>Again, these are both text fields in the underlying table.
>I have posted this question before, but although I
>received suggestions they did not work. Follow-up
>questions remained unanswered, so I am trying again.
>
>
>.
>



Relevant Pages

  • Re: Need to retrieve record using one or two fields of input
    ... Microsoft Office/Access MVP ... I want to take several data input forms I have and kind of combine them ... existing form, modify it, use a query, something else? ... I'd like to be able to edit the record once I recall it. ...
    (microsoft.public.access.gettingstarted)
  • Re: Deleting/Cleaning Document Properties
    ... you may be able to modify your installation through ... Doug Robbins - Word MVP, ... I vaguely recall at some long past ... Did I recall that option correctly, or was it just wishful thinking? ...
    (microsoft.public.word.docmanagement)
  • Re: Modifying MEX arguments in place?
    ... which leads to strange behavior. ... If you can avoid it altogether, because you are sure it is never ... Modify your data at will! ...
    (comp.soft-sys.matlab)
  • Re: Making variables available to several *.m files
    ... have a function declare the structure or variables as persistent in the ... then recall them in your functions by having it pass the ... to store the structure again in your persistent function at the end of ... each function where you modify the contents. ...
    (comp.soft-sys.matlab)
  • URLConnection tricks
    ... URLConnection urlc = url.openConnection; ... How would I modify that code to avoid getting the contents of the ... file, get just the headers? ...
    (comp.lang.java.programmer)