Can show tell me that can I do this by VBA

1308057

Registered User.
Local time
Yesterday, 22:36
Joined
Jul 28, 2008
Messages
10
Can someone tell me that can I do this by VBA? Many thanks!!

Hi everyone, it may be a bit long to describe the situation, thanks for showing understand.

*************************************************
I work in a bank and am establishing a database for internal staff in my department to apply different event, such as golf day, soccer.



To make it simple, assumed that there is 3 teams in my department, each team can apply various events and then get tickets of events.
Each team can at most get the amount of tickets assigned by me.

To do this, I have a table call [tbl_event], there are 4 fields on it, namely,
"Event Name" --- the name of the events
"Team A " ---- maximum ticket assigned to Team A
"Team B " ---- maximum ticket assigned to Team B
"Team C " ---- maximum ticket assigned to Team C

for example,
Event name | Team A | Team B | Team C |
ABC event -----4---------- 5------- 6--------

which means that under ABC event, Team A can get 4 tickets at most.


i have form [frm_event], there is a combo box which row source is [tbl_event].[Event Name]
in this form, there is also a datasheet subform called [subform_event]

When team representive enter the form, they need to enter a password of their team, and then in the form there will be a textbox "Team Number" showing their team name , that is "Team A", "Team B" or "Team C", as a value

When a team representative of Team A choose particular event on the combobox of [frm_event], say ABC event, the subform will come out, and he can enter a number in a column of subform called "request ticket".
Finally I can know how much ticket they need in certain event by viewing the table/query

What I want to do is that, if they enter a number larger than the maximum number of tickets assigned, they can't update the subform and have to lower to number. (E.g. team A can only enter at most "4" as the number of ticket request under "ABC event", there will be msgbox warming them if number is larger than 4)

How can I establish a validation rule between the text box value "Team Number" and field of a table "Team A/B & C" ??


*********************************]
I hope it is clear enough, could someone tell me how can I achieve the above effect?
It is difficult for me to set a validation rule between a text box "Team Number" and a field of a table.


i appreciate so much if someone can give me some advice
 
Last edited:
What is your email address I can send you a solution....
 
Simple Software Solutions

The whole purpose of this forum is to glean ideas and solutions from other members and guests.

Garyholc; by sending your solution via private emails defeats the object. Other visitors may want to know if the solution did in fact work or not. Please refrain from using this tactic in the future.

BTW what did you come up with.

CodeMaster::cool:
 
Actually Gary didnt send me anything, I am still stucked by this problem =(

Could someone provide me some suggestion?
 

Users who are viewing this thread

Back
Top Bottom