Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2009
    Posts
    4

    Exclamation Unanswered: Urgent !! Difficulties in Data Editing in the Form

    Hello Sir,

    Im facing difficulties with some logics.

    1. Im having a lookup wizard(Which has been prepared from a table).Where these values are given:
    a. Admin
    b. Indl Trg
    c. Gp Trg
    d. P/Leave

    2. There are four fields.(Where records are from Lookup Wizard)
    a. 1st Cycle
    b. 2nd Cycle
    c. 3rd Cycle
    d. 4th Cycle

    Condition:

    1. The value "P/Leave" and "Gp Trg" can only be entered once within the "four cycles". e.g if I enter 1st cycle = 'P/Leave' then in the next cycles when I will try to put 'P/leave' then it will tell to change the value.Same for "Gp Trg" also.

    2. For other values they can be entered twice.

    How to control it in the Form?
    Last edited by jhony4k; 04-27-09 at 14:20. Reason: In More Details

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    What do you mean when you write "having 4 Items in a lookup wizard"?
    Please post the code you use or try to be more explicit and give examples.

    Have a nice day!

  3. #3
    Join Date
    Apr 2009
    Posts
    4

    Sir, Ive written it in details...If you kindly give me the solution.

    Quote Originally Posted by Sinndho
    What do you mean when you write "having 4 Items in a lookup wizard"?
    Please post the code you use or try to be more explicit and give examples.

    Have a nice day!

    Sir, Plz check the thread ..Its given in details

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    You'd have to implement code in the four cycle combo boxes' before update event to check for violations of these rules. For example, in the 2nd Cycle:

    Code:
    If Cycle2 = "P/Leave" Then
      If Cycle1 = "P/Leave" Then 
        Cancel = True
        Msgbox "Not allowed etc"
      End If
      If Cycle3 = "P/Leave" ...
        ...and so on...
    End If
    Avoid using the Lookup Wizard in tables too imo. You need to understand your database and the best way to do that is to do everything yourself -- so don't use wizards if you want to achieve that.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    And yet again, LOL @ "Urgent!!" forum posting ^^
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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