473,508 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Starting field on a form

I have a form that does get initalized with the cursor in the proper field.
After hitting a button and calling another for I go back and clear the DS
and rebuild a grid; unfortunately the active field is still the button and I
need it to be in the grid.

Steve
Oct 27 '06 #1
2 1041
Monitor the form's Activated event, and call your field's Focus() method
from within it.

Private Sub MyForm_Activated(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Activated
MyImportantField.Focus()
End Sub

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
I have a form that does get initalized with the cursor in the proper
field. After hitting a button and calling another for I go back and
clear the DS and rebuild a grid; unfortunately the active field is
still the button and I need it to be in the grid.

Steve

Oct 27 '06 #2
That did the trick....

THanks,
Steve
"Tim Patrick" <in*****@invalid.com.invalidwrote in message
news:e3*************************@newsgroups.comcas t.net...
Monitor the form's Activated event, and call your field's Focus() method
from within it.

Private Sub MyForm_Activated(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Activated
MyImportantField.Focus()
End Sub

-----
Tim Patrick
Start-to-Finish Visual Basic 2005
>I have a form that does get initalized with the cursor in the proper
field. After hitting a button and calling another for I go back and
clear the DS and rebuild a grid; unfortunately the active field is
still the button and I need it to be in the grid.

Steve


Oct 27 '06 #3

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

Similar topics

4
6788
by: Andy Hutchings | last post by:
Hi everybody - hope you can help out here. I have a form in a database, which is a columnar form from one of the tables in the db - there is a sub-form to the form which is a datasheet view of...
2
1589
by: marko | last post by:
I don't know how to form my question but this is my problem: I would like to fill out a form containing let's say 3 fields and then when i go to the next record. Now the next record would be blank...
2
1871
by: karl | last post by:
I have a windows service that kicks off a 'monitor' thread which in turn kicks off 4 additional threads. These 4 threads basically are listen on a designated socket and report back any errors...
9
8273
by: AA Arens | last post by:
When I start a new record, the <autonumbering> ID in the field is not updated yet, only when I fill in the first field of that record. How to solver it? Bart Access 2003
9
3053
by: antheana | last post by:
Hi there, I have created Job table where I have to enter the startdate and finish date for each job I work on. The problem is that some jobs only last 1 day. I have a field called JobLength where...
9
9667
by: Ecohouse | last post by:
I have a main form with two subforms. The first subform has the child link to the main form identity key. subform1 - Master Field: SK Child Field: TrainingMasterSK The second subform has a...
1
1551
by: sathyan8294 | last post by:
i want to display the name starting with any letter(A-Z,a-z) in textbox from sqldatabase through datagrid using vb.net windows application. for example, values are in datagrid like companyid ...
3
6204
by: jackiemasson | last post by:
Hi, I want to start Dragon Naturally Speaking when the user enters a field on an Access form and stop when they exit the field. I would like to save the audio file to a specific folder and pass...
11
4046
by: ZaphodBBB | last post by:
Hi I have a table that has as its Primary Key the Auto-Increment Field: Equipment_Number. In M.S. Access is there any way to define a starting number for the field? OR another way in which...
0
7233
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
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7342
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
7410
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
5650
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
5060
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
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
440
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.