Results 1 to 8 of 8
  1. #1
    anchamal is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2010
    Posts
    15

    compile error on goto record from touch screen

    I CREATED NUMERIC BUTTONS TO NAVIGATE THROUGH RECORDS.
    ONCE I TYPE THE NUMBER I NEED TO CREATE THE ENTER KEY SO THAT I CAN GO TO THE SPECIFIG RECORD.

    I HAVE THE FOLLOWING CODE:



    Me.Combo117 = Me.Combo117 & "2" AND SO ON FOR ALL NUMBERS.

    FOR THE ENTER KEY I HAVE:
    Me.Combo117.SetFocus
    DoCmd.GoToRecord = Me.Combo117


    BUT I GET COMPILE ERROR AND I CAN NOT FIGURE OUT ANY SOLUTION.

    THANKS IN ADVANCE

  2. #2
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    please check the syntax of DoCmd.GoToRecord

  3. #3
    anchamal is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2010
    Posts
    15

    compile error on goto record from touch screen

    this is how i'm writting it

    DoCmd.GoToRecord = Me.Combo117

  4. #4
    weekend00 is offline I may not be right
    Windows XP Access 2003
    Join Date
    Aug 2010
    Posts
    1,295
    GoToRecord Method

    See AlsoApplies ToExampleSpecifics
    The GoToRecord method carries out the GoToRecord action in Visual Basic.
    expression.GoToRecord(ObjectType, ObjectName, Record, Offset)
    expression Required. An expression that returns one of the objects in the Applies To list.
    ObjectType Optional AcDataObjectType.
    AcDataObjectType can be one of these AcDataObjectType constants.acActiveDataObject defaultacDataFormacDataFunctionacDataQueryacDataServerViewacDataStoredProcedureacDataTable

    ObjectName Optional Variant. A string expression that's the valid name of an object of the type selected by the objecttype argument.
    Record Optional AcRecord.
    AcRecord can be one of these AcRecord constants.acFirstacGoToacLastacNewRecacNext defaultacPrevious If you leave this argument blank, the default constant (acNext) is assumed.


    Offset Optional Variant. A numeric expression that represents the number of records to move forward or backward if you specify acNext or acPrevious for the record argument, or the record to move to if you specify acGoTo for the record argument. The expression must result in a valid record number.
    Remarks

    For more information on how the action and its arguments work, see the action topic.
    If you leave the objecttype and objectname arguments blank (the default constant, acActiveDataObject, is assumed for objecttype), the active object is assumed.
    You can leave an optional argument blank in the middle of the syntax, but you must include the argument's comma. If you leave one or more trailing arguments blank, don't use a comma following the last argument you specify.
    Example

    The following example uses the GoToRecord method to make the seventh record in the form Employees current:
    DoCmd.GoToRecord acDataForm, "Employees", acGoTo, 7

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Did you pay any attention to the responses I and others posted to this question on another site yesterday?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    anchamal is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2010
    Posts
    15

    compile error

    what is the command that simulated the enter/return key.

    this is what i'm missing..... i think so

    thanks for your reply

  7. #7
    anchamal is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Dec 2010
    Posts
    15

    compile error

    Paul

    sorry i did not see anything

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Compile Error: Argument Not Optional
    By bg18461 in forum Access
    Replies: 1
    Last Post: 12-01-2010, 08:47 AM
  2. new compile error!
    By darklite in forum Access
    Replies: 6
    Last Post: 09-02-2010, 05:13 PM
  3. compile error
    By darklite in forum Access
    Replies: 6
    Last Post: 08-31-2010, 04:27 PM
  4. compile error: expected end of statement
    By RedGoneWILD in forum Programming
    Replies: 5
    Last Post: 07-29-2010, 10:12 AM
  5. On Error GoTo does not resume?
    By easbrandel in forum Programming
    Replies: 5
    Last Post: 04-15-2010, 04:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums