Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / November 2007

Tip: Looking for answers? Try searching our database.

How to choose the right event ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed Dror - 30 Nov 2007 19:27 GMT
Hi there,

I have a barcode (2D) which transfer the information to my form.
The last recod in the form is like 005} and it stay there (textbox)
And I want to move to a new record so I wrote

Private Sub Suffix_Dirty(Cancel As Integer)
On Error GoTo Err_CmdNew_Click

   DoCmd.GoToRecord , , acNewRec
   Me.Description.SetFocus
Exit_CmdNew_Click:
   Exit Sub

Err_CmdNew_Click:
   MsgBox Err.Description
   Resume Exit_CmdNew_Click
End Sub

Even AfterUpdate or GotFocus it dosen't save the record it move it into the
next textbox

(I know you can press TAB but i don't want the user do extra typing)

How do I make sure that the last textbox get the value and then move to new
record?

Thanks,
Ed Dror
Douglas J. Steele - 30 Nov 2007 20:56 GMT
What is Suffix, the name of the control?

Text boxes don't have a Dirty event, only the Form does. Try changing it to

Private Sub Form_Dirty(Cancel As Integer)

and see whether it works. (and just in case Suffix is the name of your form,
it's the word Form that must be there, not the name!)

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hi there,
>
[quoted text clipped - 25 lines]
> Thanks,
> Ed Dror
John W. Vinson - 30 Nov 2007 20:59 GMT
>How do I make sure that the last textbox get the value and then move to new
>record?

Several steps needed:

- The field to which the textbox is bound must be a Text field and it must be
the same size for each record. If the field is of variable length, Access has
no way to know that you're "done" with the field!
- Set the control's AutoTab property to Yes (thus if the field is 8 bytes
long, it will tab the instant the eighth character is entered either by typing
or from the scanner).
- Set the form's Cycle property to All Records.

            John W. Vinson [MVP]
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.