Re: Store Part of Entry
From: Jim Allensworth (jimNOT_at_datacentricsolutions.com)
Date: 08/19/04
- Next message: Jim Allensworth: "Re: Building different reports from one Table"
- Previous message: Deb Smith: "DoCmd.Close-Access Shuts Down"
- In reply to: AHopper: "Re: Store Part of Entry"
- Next in thread: AHopper: "Re: Store Part of Entry"
- Reply: AHopper: "Re: Store Part of Entry"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 23:04:42 GMT
A string variable should be fine. It doesn't look like you have looked
at the additional code I posted yet. In that I just reference the
textbox, but a variable set to the textbox would work also. Note that
I also addressed some other issues related to user typed entries. You
might want to take a look at those.
- Jim
On Thu, 19 Aug 2004 15:38:50 -0700, "AHopper"
<anonymous@discussions.microsoft.com> wrote:
>Jim, Rick,
>I have been experimenting and have been able to populate
>the text box by declaring a variable in the After Update
>event and then replacing the number in your suggestion
>with the variable. Not certain this is the right or best
>way but it is working.
>
>Thanks
>Allan
>>-----Original Message-----
>>Rick
>>I have been able to populate the text from the unbound
>>text box after update event as you suggested. However, I
>>don't know how to make the code CLng(Right("C 108900 P
>>000516338",9)) generic.
>>I always get 516338 and am not able to scan other bar
>>codes.
>>
>>Thanks
>>Allan
>>
>>>-----Original Message-----
>>>You need to put the scanned (full) number in an unbound
>>text field. Then
>>>use the code mentioned to take the right 9 digits from
>>that field and place
>>>them into the bound field where you wish to store the
>>truncated data.
>>>
>>>Rick B
>>>
>>>
>>>"AHopper" <anonymous@discussions.microsoft.com> wrote
>in
>>message
>>>news:938f01c4862e$db6edd30$a501280a@phx.gbl...
>>>Jim,
>>>The text box is called "UniqueLabel"
>>>Do I place this code in one of the events like Before
>>>Update, After Update?
>>>
>>>This is only a sample code. The format will always be
>the
>>>same - Letter, space, 6 digits, space, letter, space, 9
>>>digits.
>>>How would I make it generic so it would apply to any
>code
>>>as it is scanned in?
>>>
>>>After thinking more about this entry form, I realized
>>>that it is possible for users to enter the number
>without
>>>scanning it. If they do and the number is 9 digits or
>>>less I want the entry to be allowed.
>>>
>>>Thank you for your support and help
>>>Allan
>>>
>>>>-----Original Message-----
>>>>Try this ..
>>>>
>>>> CLng(Right("C 108900 P 000516338",9))
>>>>
>>>> 516338
>>>>
>>>>- Jim
>>>>
>>>>On Thu, 19 Aug 2004 12:54:43 -0700, "AHopper"
>>>><anonymous@discussions.microsoft.com> wrote:
>>>>
>>>>>I posted this question as one of several questions in
>>>>>Tables & Database Design, however, I think this has
>>>more
>>>>>to do with a text box event so I am posting it here.
>>>>>
>>>>>I have a barcode with the following format:
>>>>> C 108900 P 000516338
>>>>>
>>>>>The barcode and will be scanned into a text box,
>>>however
>>>>>I only want to store the last 9 digits that are
>greater
>>>>>than 0, in this case 516338. The field that will store
>>>>>this is set to Number, Double.
>>>>>
>>>>>How can I set up the text box to only store the part
>of
>>>>>the entry I want?
>>>>>
>>>>>Thank you for your help
>>>>>
>>>>>Allan
>>>>>
>>>>>
>>>>
>>>>.
>>>>
>>>
>>>
>>>.
>>>
>>.
>>
- Next message: Jim Allensworth: "Re: Building different reports from one Table"
- Previous message: Deb Smith: "DoCmd.Close-Access Shuts Down"
- In reply to: AHopper: "Re: Store Part of Entry"
- Next in thread: AHopper: "Re: Store Part of Entry"
- Reply: AHopper: "Re: Store Part of Entry"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|