473,513 Members | 3,208 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to check check which control is active

Access 2000

I want to run some code on the Form_BeforeInsert event. But if the user is
entering data into one particular text box I do not want the code to run.
Something like...

If user not in control 'txtDate' then
run some code here
end if

How can I check which control the user is entering data before running the
code?

Thanks for any help.

Adrian
Nov 13 '05 #1
2 1743
Adrian wrote:
Access 2000

I want to run some code on the Form_BeforeInsert event. But if the user is
entering data into one particular text box I do not want the code to run.
Something like...

If user not in control 'txtDate' then
run some code here
end if

How can I check which control the user is entering data before running the
code?

Thanks for any help.

Adrian


See if ActiveControl will help.
Nov 13 '05 #2
Salad,

Thanks very much

Adrian

"Salad" <oi*@vinegar.com> wrote in message
news:0H*****************@newsread3.news.pas.earthl ink.net...
Adrian wrote:
Access 2000

I want to run some code on the Form_BeforeInsert event. But if the user is entering data into one particular text box I do not want the code to run. Something like...

If user not in control 'txtDate' then
run some code here
end if

How can I check which control the user is entering data before running the code?

Thanks for any help.

Adrian


See if ActiveControl will help.

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1490
by: Steve McLellan | last post by:
Hi, I have an MDI application. Child forms have control boxes with min/max/restore buttons. As well as using the MDIList menu property to choose between forms, I have a representation of the...
3
10042
by: Robert Neville | last post by:
How do you return the last Active Control when the control is on a tab control? Screen.ActiveControl does not seem to work. Here's the statement that my code uses. Set ctlOld =...
0
2104
by: Vinod. | last post by:
Hi all, I have added browser control to a windows form. I am loading pages having multiple frames. I have noticed that the focus in a text is not maintained when the application is deactivated....
0
1264
by: Kannan | last post by:
My application is an MFC application but since MFC is essentially a Object Oriented wrapper for Win32 I am taking the liberty to post my question here. I also must confess that I am not an Active X...
1
4245
by: scprosportsman | last post by:
Please help guys, i am trying to set up a database here at work and im fairly new to access in terms of writing functions and queries and stuff. I have 2 different places on my design that will...
3
17077
by: Dabbler | last post by:
I have a checkbox control in a GridView EditItemTemplate. My SqlDataAdapter complains when I try and use UpdateCommand Thanks on any binding clarification. GridView: <asp:TemplateField...
2
1306
by: Jaaz | last post by:
Essentially I'm constructing a database to track a lot of data. Part of this included a running history table that is linked to data outside the table. On the main form I used, I've hit a snag. ...
2
2092
by: Randy | last post by:
I have a form on which various controls are added dynamically depending on actions of the user. One of these actions allows the user to click a delete button that will remove various other...
10
4978
Dököll
by: Dököll | last post by:
Me again! I have been battling this one for months. Wrote below to aid in getting certain subforms to hide once checkbox named Active is clicked. I am hoping to make the code work for Date...
0
7254
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7432
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5677
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5079
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
452
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.