# Thread: Urgent !! Difficulties in Data Editing in the Form

1. Registered User
Join Date
Apr 2009
Posts
4

## 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:
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. Moderator
Join Date
Mar 2009
Posts
5,442
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. Registered User
Join Date
Apr 2009
Posts
4

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

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. L33t Helpa Munky
Join Date
Nov 2007
Location
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.

5. L33t Helpa Munky
Join Date
Nov 2007
Location