Position Of Cursor On New Record On A Form

Aug 21, 2006

I'm trying to ensure that each time a new record is opened in a form, that the cursor is positioned in the first control/field... I have this throughout most of my application but not in a few individual forms.

I know I've done something in the past to ensure that this happens, but I can't remember what it was...

Thanks,
Peter

View Replies


ADVERTISEMENT

Forms :: Main Form To Subform Cursor Position

Oct 31, 2013

On main form cursor working is goods as per default. But after come to in Subform its shown the cursor position in the last filed. So every new record is shown as the same last field. How to do this cursor position will be change in subform as per default?? and every new record its need to show as per default TabIndex "0".

I have checked my Tab Index & Order Settings also it is good. But its shown as last filed in subform

I have attached the Screen shot.

View 7 Replies View Related

Cursor Position

Nov 21, 2006

Hi

ive got a form that has several textboxes. The cursor in all textboxes appears on the left hand side (which is good), but one field shows the cursor on the right side??!!! how do i change this, i want the cursor to be on the left hand side like the rest?

cheers

View 4 Replies View Related

Modules & VBA :: How To Keep Cursor Position In A Text Box

Feb 8, 2014

I have below code for maximum 3 criteria dynamic search:

Code:
Private Sub SearchFor_Change()
Dim strWhere As String
Dim Criteria As String
Dim i As Integer
Dim A
Dim strAdd As String

[code]...

There is a problem, since I put the code in a textbox's on change event. then in case i want to revise the first two criteria, the cursor will automatically fleets to the end of the text, I want to know how to keep the position of the cursor?

View 4 Replies View Related

Auto Put Cursor In First Position When Clicking In Text Box?

Mar 10, 2005

I have several fields with text boxes and input masks. When a user clicks in these fields, it puts them in whatever position in the text box they click in. If they click to the far right, it takes them to the right position and doesn't let them type the entire date, formula, etc.

Any way to set the text box so that no matter where they click it automatically starts in the first position?

View 5 Replies View Related

Forms :: Cursor Position To Be Same After Hitting Enter?

Aug 4, 2014

I have a text box which i use as a "search box"

I type in characters and my data sheet at the bottom will display all matches

What i want to happen is for the cursor to stay on the same text (search) box after hitting enter.

View 4 Replies View Related

Position Cursor At End Of Text Box After AfterUpdate Property

Oct 7, 2013

I am using an unbound textbox at the top of my form for filtering purposes. The user types in a string and hits "Tab" which kicks of the filter which is defined in the AfterUpdate property. I want the focus to return to the same textbox and position the curosor after the last character. I am trying to use SelStart but not having success.

Code:
Me.Filter = "COURSE_NAME Like '*" & Me.txtFilter & "*'"
Me.FilterOn = True
txtFilter.SetFocus
txtFilter.SelStart = txtFilter.SelLength

View 9 Replies View Related

Modules & VBA :: Position Cursor To Left Bottom Of Control

Jul 22, 2015

I recently found a neat little module which allows you to duplicate a right click & bring up pop up menu ( say by left clicking on a field). I find this very good for creating a nice little menu system in which I can reproduce the nice features of Access menus (I'm using Access 2002) but with a lot more flexibility.

So, I have a line of labels across the top of the form which are my top level menu items - when I click or mouse over these I want to have the pop up menu appear directly under the label. I can position the pop up menu manually by SetCursorPos(x,Y) but as my forms are Pop Up and can move this has proved to be a pain.

What I am after is something that will allow me to work out the coordinates of the left bottom of the label and then position the cursor there then drop the menu. The difficulty I'm having is converting or understanding the position of the label (me.label1.left etc) and relating that to what SetCursorPos needs.

View 4 Replies View Related

General :: Moving Cursor Position In Email Message Body

Nov 14, 2012

Is there an automatic way of moving the cursor when an outlook email is opened using a VBA event??

Right had a look and haven't managed to google this yet but the background is as follows

I have some code that puts a recordset of people's email into outlook and leaves users with the outlook message open ready for them to append anything they want to the message body.

At the moment the cursor flashes at the very start of the message and users need to scroll down with keys or the mouse to the end before they can add additional text.

I want to automatically move the cursor to the end of the outlook email message opened using a VBA event?

View 3 Replies View Related

Forms :: Position The Cursor To The Beginning (left Side) Of The Field?

Apr 17, 2013

I have several comboxes where I'm using date/time input masks. When I go to enter data in the field the cursor is situated at the right end of the box. I have to backspace to the beginning of the field to enter the data. How do I position the cursor to the beginning (left side) of the field?

View 3 Replies View Related

Deleting Record Using Main/Subform While Maintaining Record Position

Jul 6, 2006

Hello All,

I have an ordering db that utilyzes the typical Form / Subform layout. I
would like to be able to delete a record from the Main form and maintain the
same postion relative to the other records. For example, if I am scrolling
through the records and want to delete record #45, After I delete it I would
like to be able to have record #44 visible to the user.

I am currently using (2) SQL statements to delete the records from the main
Order table and the Order Details table which are linked without Cascade
Delete Related Records being on.

I had set-up a recordset procedure to try and find the bookmark set before
deletion but the only way I can get the sub-form to not show a blank form (no
controls visible for the record just deleted and the #deleted in controls on
the main form) is to requery after the delete, which loses the bookmark. If
i place the ReQuery at the end it displays the records properly, (without the
blank record) but returns the record to the first record. I have tried
turning off any sorting references to OrderBy, etc. but it still returns to
the first record.

I have also tried using "DoCmd.RunCommand acCmdDeleteRecord" but it doesn't delete the record from both tables.



Dim rst As Recordset
Dim strSearchName As String

Me.AllowDeletions = True
Me.sfmOrderDetails.Form.AllowDeletions = True

Set rst = Me.RecordsetClone
strSearchName = Str(Me.sfmOrderDetails.Form.txt_Order_No.Value)
rst.FindFirst "Order_No = " & strSearchName

CurrentDb.Execute "DELETE Order_ID FROM tblOrderDetails WHERE Order_ID = " &
Order_ID,dbFailOnError
CurrentDb.Execute "DELETE Order_ID FROM tblOrders WHERE Order_ID = " &
Order_ID, dbFailOnError

Me.Requery
Me.sfmOrderDetails.Form.Requery

Me.Bookmark = rst.Bookmark
Set rst = Nothing

Thanks!

View 6 Replies View Related

Record Position

May 19, 2005

if i open a form which has 100 records in it, in the navigational buttons at the bottom i can see the number of the record which i am viewing ... for instance record 24 of 100 ... Now if i decide to set the navigational buttons to not be displayed, is there any way through code, in which i can get the record number (for example Record 24) ?

Thank You

View 3 Replies View Related

Making Cursor Go Back To The Record I Came From?

Dec 27, 2006

I have a subform (continuous) which shows a summary of all clients basic data in a list. Clicking a client requerys and refreshes some other subforms so the accompanying data for that client is shown. Whenever I double click a record, the "main" window for that "object" opens. So say I double click on client A1 in the summary list, a form opens where I can view all the clients data and change it if necessary. That same form is also used to add clients to the database.

Whenever I change or add a clients data and close the form, the following code is executed:

Private Sub Form_Close()
On Error GoTo ClientsAdd_Err

Forms![ClientsMain]![ClientsViewSummarySubForm].Form.Requery
Forms!ClientsMain.Refresh

ClientsAdd_Exit:
Exit Sub

ClientsAdd_Err:
MsgBox Error$
Resume ClientsAdd_Exit
End Sub

Which makes the new client appear in the summary list or makes the changed data of an existing client appear in the summary list. That's what I want it to do of course.

But whenever that is done, the cursor jumps back to the first record (client 1) in the summary list. What I would like to have happen is:

- when a new client has been added, keep the cursor on that client in the summary list after the form closes and the list is updated.

- when a record of an already existing client is changed and the form closes, keep the cursor on that client in the list also.

DoCmd.GoToRecord acForm, "ClientsViewSummarySubForm", acLastgives "The object ClientsViewSummarySubForm isn't open. As does the same line of code but then using the name "ClientsViewSummary". The form itself is called that way. The subform object itself goes by: "ClientsViewSummarySubForm".

I've tried some variations but all without succes.
Which line of code is the correct one to use for a subform on a parentform instead of "just" a normal, open form?

View 2 Replies View Related

Cursor Jumps Back To First Record

Apr 4, 2005

Every time I enter the value for the OservationType in Subfrm it jumps back to the very first record. Can any body help me solving this problem. I thought it is tub order issue but it is not. I attached the sample db to this email. Please, help me. Thanks.

Girma

View 2 Replies View Related

Forms :: How To Put Cursor On Newly Created Record After Requery

Apr 14, 2015

I launch a 'CreateNewRecords' form from a 'MainForm' form. When the 'CreateNewRecords' form closes, the new record is visible on 'Main Form'.The underlying query is unsorted, so this code in the AfterUpdate event of 'CreateNewRecords' puts the cursor on the last record displayed on 'MainForm', which is the newly created record:

Forms!frmMainForm.Requery
With Forms!frmMainForm.RecordsetClone
.MoveLast
Forms!frmMainForm.Bookmark = .Bookmark
End With

However, I intend to sort the underlying query, which means that a newly created record may appear in the middle of the records displayed on 'MainForm'.

What I want to have happen is that after a new record is created by 'CreateNewRecords', the underlying query is requeried so that all current records are displayed on 'MainForm' but also that the cursor rests on the newly created record (rather than default to the first record).

View 7 Replies View Related

Modules & VBA :: How To Automatically Set Cursor To First Record (in Subform Of A Tabcontrol)

Oct 31, 2014

All I have a form called frmMain. This form contains a TabControl named tabMain tabMain has some pages. One of the pages is called pagRecords pagRecords contains a subform called frmRecords. frmRecords contains records from an in-memory table.

My problem: If I select tab pagRecords the cursor is set to the last record.

What I want: as soon I select tab pagRecords, the record cursor must always be set to the first record.

I think this can be done with next code.

Code:

DoCmd.GoToRecord acActiveDataObject, , acFirst

However, I placed this line in a lot of event properties but it is never triggered (I put a break on the line).

So on which object and event should I put this line? (and is acActiveDataObject the right parameter?)

View 2 Replies View Related

Inserting Or Moving A Record To A Different Position In The Table

Oct 14, 2005

Hi,
With a table in open view can a record be moved to a different position, i'm using access 2003. Also is there any way to sort besides ascending or descending?
I've got a lot of tables to make and if I forget a single column/field and have to add it later (like I have done all ready numerious times) I'm almost having to recreate the table again in order to have the field fit in the correct spot in the table. These tables are bound to combo boxes so its important every thing is grouped for easy choosing.

Thanks--All help will be very appreciated

View 6 Replies View Related

Position A Form

May 22, 2007

I have a Logo which is actually startup form. I need a code to position this statrup form on near to bottom right corner of access window in all resolution. How ever at present I am using code :

Res = GetScreenResolution()

If Res = "800x600" Then
DoCmd.MoveSize 9600, 5600
ElseIf Res = "1024x768" Then
DoCmd.MoveSize 13000, 8000
ElseIf Res = "1152x864" Then
DoCmd.MoveSize 14500, 9500
ElseIf Res = "1280x720" Then
DoCmd.MoveSize 16200, 7200
ElseIf Res = "1280x768" Then
DoCmd.MoveSize 16200, 7800
ElseIf Res = "1280x1024" Then
DoCmd.MoveSize 16200, 11400

End If

But some times user use the application on different resulotion other then mentioned in code, the position of startup form looks awkward.

regards

Rahul

View 1 Replies View Related

General :: How To Make Form Controls Change Size / Position As Form Is Resized

Jul 24, 2013

how to make my form controls change size / position as my form is resized / loaded on a computer with a different resolution. Several of the tutorials out there suggest putting code on the "on resize" property of the form. When I looked at the Northwind database to try to mimic their code however, it looks like they must be doing something different as there is no on resize code under the form properties and I was unable to find the code they do use.

View 4 Replies View Related

How To Recenter The Form Position

Jul 17, 2007

I want when the form ativate to reput it in the center of the screen. is there any property to do this in the code, as the autocenter is set only in the design view

THANKS,

View 1 Replies View Related

Changing Startup Position Of Form

Sep 3, 2004

I am having a problem with my form. When it opens up, it is maximized, which is what I want. However, the vertical scroll bar on the right does not begin at the top of the form, but towards the bottom. I have to scroll up each time so that I can see the top of my form. Is there a way to make the form startup at the top of the form?

View 1 Replies View Related

Prevent Cursor From Moving On Image / Form Change

Feb 8, 2007

I've created a form. Within that form I have an image control. I am using this code to pull the corresponding plant image from a folder filled with JPGs.

It works just fine except one thing. When I change from record to record my cursor jumps to the center of the pulled JPG. I don't want my cursor to move at all when loading these images. Is this possible? Thanks.


Private Sub Form_Current()

Dim FileExistsbol As Boolean
Dim stFileName As String

stFileName = CurrentProject.Path & "- Landscaping Material Images" & _
[LandscapeCommonName] & ".jpg"
stFileName = Trim(stFileName)
FileExistsbol = Dir(stFileName) <> vbNullString

If FileExistsbol Then
[LandscapeMaterialImage].Visible = True
Me![LandscapeMaterialImage].Picture = stFileName
[LabelNoPictureAvailable].Visible = False
Else
[LandscapeMaterialImage].Visible = False
[LabelNoPictureAvailable].Visible = True
End If

End Sub

View 2 Replies View Related

Tabbed Form Flashes When Cursor Hovers Over Buttons

Feb 1, 2005

I have a client using an access DB that I have built. It was built using Access 2000 and he is running it on Access 2003. The problem is that when he opens one of the forms which is tabbed and he moves to the second page when he moves the mouse pointer over some hyperlink buttons the background colour ,which is normally blue flashes to yellow. Every other user working with 2000 does not have this problem. I cannot find the reason. Can anyone help please?

View 1 Replies View Related

Forms :: Continuous Form Cursor Jumping Around On Entry

Mar 5, 2015

I have checked the tab order and have cycle for my form set to = all records (but have also tried current record). After I update one of any of my textboxes in the details section and then click or tab into the next box, the cursor jumps back to the first record, first field.

View 1 Replies View Related

Forms :: Cursor Moving On Multi Subforms In A Form?

Mar 6, 2015

Issue with Cursor moving on multi Subforms in a form.

I have 2 sub-forms in a main form as per screenshot. So Cursor moving from main form to 1st subform working well. After can't move the cursor from 1st subform to 2nd subform with tabbing or entering. Still there in 1st Subform in the last entered filed after tabbing or entering. I've checked on tab orders also they shown correct but it is can't move to 2nd subform.

View 2 Replies View Related

Coming Back From Report - Form Out Of Position

Jun 23, 2006

hi i have a button that loads a report. If i then close the report the form, which is set with no border/no max/min/close/non movable and opens maximised, places itself off centre. I want it to stay maximised full screen. The only work around i currently have is when the use moves the mouse over the form it maximises itself. Will this then be calling this function everytime the mouse moves(cant be very efficient). is there a better way to maximise the form Immediately after closing the report.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved