Results 1 to 5 of 5

Thread: Validating Data

  1. #1
    Join Date
    Sep 2004
    Posts
    112

    Unanswered: Validating Data

    Hi all,
    I have a query with 2 tables, (Table1) (Table2).
    (Table1) has field names:
    Order No - 'primary key, indexed'
    Desc
    Qty
    Date

    (Table2)
    Order No - 'indexed-duplicates'
    Qty Comp
    autoDate

    The query is called 'Link' the join propertys are Table1 and Table 2 are equal.

    I have a form looking ate the query with all the fields from Table2 and all the fields from table1 except the Order No.

    When the user updates the Order No field in Table 2 it shows all the data on the form ie Desc,Qty etc.

    The problem is I can enter anyting I want into the Order field displayed on the form and obviously no data from Table 1 is shown. What I want to do is when a user enters an incorrect value either a message pops up to say ' wrong value try again' or nothing to pop up and the user cant go any further untill he enters a value to match the value in Table 1.
    Any code very very welcome.

    Understand anyone???????

    Saltman

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    sorry - i know this is not the helpful reply you wanted.
    ...but if you need intimate control over validation, there is simply no choice: you must move to unbound forms.

    UPSIDE - with unbound forms you have an unlimited number of clock cycles to consider the data with which the user is trying to pollute your database.

    DOWNSIDE - you have to write "really complicated expressions" like
    insert into mytable (thisField, thatField) values (thisX, thatY);

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Sep 2004
    Posts
    112
    Thanks,
    Is there any way you could expand on your answer and maybe post some examples?. Say I had just one field on a form 'Order No' how would I link that to my database with unbound text boxes/labels?

    Saltman

  4. #4
    Join Date
    Dec 2003
    Location
    Dallas, TX
    Posts
    1,004

    Talking

    Quote Originally Posted by saltman
    Thanks,
    Is there any way you could expand on your answer and maybe post some examples?. Say I had just one field on a form 'Order No' how would I link that to my database with unbound text boxes/labels?

    Saltman
    Quote Originally Posted by saltman
    Thanks,
    Is there any way you could expand on your answer and maybe post some examples?. Say I had just one field on a form 'Order No' how would I link that to my database with unbound text boxes/labels?

    Saltman
    Hi Saltman,

    Could you make a small sample of your database and post it here. Might be able to fix that for you. I attached something here that I think is what you are trying to get at. If not then just toss it. There is an Unbound Form in the database where you input your dates desired, then clicking on the CommandButton causes it to open a Form based on the DateRange you selected. The trick is behind the CommandButton Open Form.
    Anyway just seeing if I could offer a little assistance.

    hope you get it worked out. Post a sample if you can.
    have a nice one,
    BUD
    Attached Files Attached Files

  5. #5
    Join Date
    Sep 2004
    Posts
    112
    Many thanks Bud.

    I'll have a play with your sample and see what I can do.

    Hows the weather in Dallas? its snowing at the mo in Manchester!

    Cheers,

    Saltman.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •