Results 1 to 3 of 3

Thread: leading zero problem

  1. #1
    pmsg is offline Novice
    Windows XP Access 2003
    Join Date
    Apr 2012
    Posts
    1

    leading zero problem

    Hi All
    I am new to this forum and my English isn't best quality.
    I have a problem with 'leading zero' in combo box. In my table [Checks list] I have column with number of check [check #]. The values' format I put as '000' and I have, for example '001', '005', '010', '099' values in individual records. In next steep I prepared form with combo box [Combo0] and I connected this one with column [check #]. The LimitToList Property = True and therefore I must press '0' or '00' keys' sequence if I wish select value under 100 in combo box I want to use keyboard only, I don't like work with mouse - it's so slow tools Someone know how I can change this situation? I want to press key [7] only and after press [Tab] I want to see '007'(like James Bond in my form. And second problem: when I input value (for example '015') from combo0 to any variable (ControlNo = combo0.value), I have '15' as value of variable, but I need 'full information' i.e. '015'. MS Access 2003, VB 6.3.

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,558
    I noticed there hasn't been a reply yet so I'll at least put in my thoughts.
    1. I 'think' you cannot have the 007 in your format AND get to it in the combo box by typing 7. Typing 7 should take you to 700 [if there is a 700] - or the lowest number starting with the number 7.
    I believe that's just the way it works in Access.
    2. BUT - you can always Click & use the down-arrow on your keyboard to scroll down to the number you want without using the mouse.
    Mouse isn't ALWAYS slow . . . I watch guys play 'World of Warcraft' and they always play Mouse + Hot Keys . . .
    Not sure if that will work in Access, though!!


    Let us know if you have any other questions. All the best!

  3. #3
    TG_W is offline Competent Performer
    Windows XP Access 2007
    Join Date
    May 2010
    Location
    Manvel, TX
    Posts
    299
    Have you tried an AfterUpdate VBA code? Maybe something like the following.

    Private Sub Combo0_AfterUpdate()
    Me.Combo0 = Format(Me.Combo0,"000")
    End Sub

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

Similar Threads

  1. Help! Access Keeps Stripping Leading Zero
    By geraldselectric in forum Access
    Replies: 2
    Last Post: 01-15-2012, 10:04 AM
  2. Leading Zeros
    By dirtbiker1824 in forum Access
    Replies: 1
    Last Post: 03-14-2011, 01:16 PM
  3. Adding Leading Zeros
    By jo15765 in forum Access
    Replies: 13
    Last Post: 11-20-2010, 09:11 PM
  4. leading 'Zeros' in data
    By wasim_sono in forum Forms
    Replies: 3
    Last Post: 04-06-2009, 10:57 AM
  5. Leading Zeroes
    By FREEEEEEDOM in forum Access
    Replies: 2
    Last Post: 04-06-2009, 09:23 AM

Tags for this Thread

Posting Permissions

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