PC Review


Reply
Thread Tools Rate Thread

Adding a Prefix

 
 
Charlienews
Guest
Posts: n/a
 
      19th Jun 2010
Hi,

My MDB needs to be distributed to our 2 salesmen on their laptops. As they
will be raising quotes with separate replicated BE I need to issue the quote
numbers with a prefix of thier initials. The quote numbers as currently
generated sequentially via a macro and update query which updates the number
in the table. With one BE, this works a treat, but now I need to be able to
keep the quote numbers unique as these will be linked to the orders.

Any help would be appreciated.

Thanks in advance

Charlie


 
Reply With Quote
 
 
 
 
Tom van Stiphout
Guest
Posts: n/a
 
      19th Jun 2010
On Sat, 19 Jun 2010 18:02:38 +0100, "Charlienews"
<(E-Mail Removed)> wrote:

The recommended way to do this is to have a hidden QuoteID that is a
random autonumber. That way there will rarely be collisions.

Another option is a standard autonumber, and have the Primary Key over
this Autonumber + the SalesrepID.

If you have to generate a human-readable quotenumber as you describe,
write some VBA code. Search the web for the "DMax+1" technique.
Keywords: BeforeInsert, DMax

-Tom.
Microsoft Access MVP


>Hi,
>
>My MDB needs to be distributed to our 2 salesmen on their laptops. As they
>will be raising quotes with separate replicated BE I need to issue the quote
>numbers with a prefix of thier initials. The quote numbers as currently
>generated sequentially via a macro and update query which updates the number
>in the table. With one BE, this works a treat, but now I need to be able to
>keep the quote numbers unique as these will be linked to the orders.
>
>Any help would be appreciated.
>
>Thanks in advance
>
>Charlie
>

 
Reply With Quote
 
Charlienews
Guest
Posts: n/a
 
      20th Jun 2010
Hi Tom,

Thanks for your reposnse.

The end result I need is: RepName / QuoteNumber.

I would use =[RepName]&" "&[QuoteNumber] in the Controlsource but I do need
the final result saved to the table.

Thanks

Charlie


"Tom van Stiphout" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Sat, 19 Jun 2010 18:02:38 +0100, "Charlienews"
> <(E-Mail Removed)> wrote:
>
> The recommended way to do this is to have a hidden QuoteID that is a
> random autonumber. That way there will rarely be collisions.
>
> Another option is a standard autonumber, and have the Primary Key over
> this Autonumber + the SalesrepID.
>
> If you have to generate a human-readable quotenumber as you describe,
> write some VBA code. Search the web for the "DMax+1" technique.
> Keywords: BeforeInsert, DMax
>
> -Tom.
> Microsoft Access MVP
>
>
>>Hi,
>>
>>My MDB needs to be distributed to our 2 salesmen on their laptops. As
>>they
>>will be raising quotes with separate replicated BE I need to issue the
>>quote
>>numbers with a prefix of thier initials. The quote numbers as currently
>>generated sequentially via a macro and update query which updates the
>>number
>>in the table. With one BE, this works a treat, but now I need to be able
>>to
>>keep the quote numbers unique as these will be linked to the orders.
>>
>>Any help would be appreciated.
>>
>>Thanks in advance
>>
>>Charlie
>>

>



 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      20th Jun 2010
Why do you need it saved? As long as you've got the two individual fields
RepName and QuoteNumber in the table, you can create a query that has a
calculated field that concatenates the two values and use the query wherever
you would otherwise have used the table.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele/AccessIndex.html
Co-author: "Access 2010 Solutions", published by Wiley
(no private e-mails, please)


"Charlienews" <(E-Mail Removed)> wrote in message
news:HGlTn.26865$(E-Mail Removed)2...
> Hi Tom,
>
> Thanks for your reposnse.
>
> The end result I need is: RepName / QuoteNumber.
>
> I would use =[RepName]&" "&[QuoteNumber] in the Controlsource but I do
> need the final result saved to the table.
>
> Thanks
>
> Charlie
>
>
> "Tom van Stiphout" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> On Sat, 19 Jun 2010 18:02:38 +0100, "Charlienews"
>> <(E-Mail Removed)> wrote:
>>
>> The recommended way to do this is to have a hidden QuoteID that is a
>> random autonumber. That way there will rarely be collisions.
>>
>> Another option is a standard autonumber, and have the Primary Key over
>> this Autonumber + the SalesrepID.
>>
>> If you have to generate a human-readable quotenumber as you describe,
>> write some VBA code. Search the web for the "DMax+1" technique.
>> Keywords: BeforeInsert, DMax
>>
>> -Tom.
>> Microsoft Access MVP
>>
>>
>>>Hi,
>>>
>>>My MDB needs to be distributed to our 2 salesmen on their laptops. As
>>>they
>>>will be raising quotes with separate replicated BE I need to issue the
>>>quote
>>>numbers with a prefix of thier initials. The quote numbers as currently
>>>generated sequentially via a macro and update query which updates the
>>>number
>>>in the table. With one BE, this works a treat, but now I need to be able
>>>to
>>>keep the quote numbers unique as these will be linked to the orders.
>>>
>>>Any help would be appreciated.
>>>
>>>Thanks in advance
>>>
>>>Charlie
>>>

>>

>
>



 
Reply With Quote
 
Charlienews
Guest
Posts: n/a
 
      20th Jun 2010
Hi Doug,

This field will be subsequently used for searching and filtering reports.
Giving it a unique identifyer that is not the primary key will allow me to
do this.

I have got around this by using the =[QuoteNumber]&" / "&[Rep] in the
Control source of RepName, with an after update Event Procedure in Rep of
QuoteRef = RepName which fills the QuoteRef field with the text I need to
keep a reference for.

This may seem a little long winded but it got the job done.

Thanks

Charlie




"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_gmail.com> wrote in message
news:hvl7te$mst$(E-Mail Removed)...
> Why do you need it saved? As long as you've got the two individual fields
> RepName and QuoteNumber in the table, you can create a query that has a
> calculated field that concatenates the two values and use the query
> wherever you would otherwise have used the table.
>
> --
> Doug Steele, Microsoft Access MVP
> http://www.AccessMVP.com/DJSteele/AccessIndex.html
> Co-author: "Access 2010 Solutions", published by Wiley
> (no private e-mails, please)
>
>
> "Charlienews" <(E-Mail Removed)> wrote in message
> news:HGlTn.26865$(E-Mail Removed)2...
>> Hi Tom,
>>
>> Thanks for your reposnse.
>>
>> The end result I need is: RepName / QuoteNumber.
>>
>> I would use =[RepName]&" "&[QuoteNumber] in the Controlsource but I do
>> need the final result saved to the table.
>>
>> Thanks
>>
>> Charlie
>>
>>
>> "Tom van Stiphout" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> On Sat, 19 Jun 2010 18:02:38 +0100, "Charlienews"
>>> <(E-Mail Removed)> wrote:
>>>
>>> The recommended way to do this is to have a hidden QuoteID that is a
>>> random autonumber. That way there will rarely be collisions.
>>>
>>> Another option is a standard autonumber, and have the Primary Key over
>>> this Autonumber + the SalesrepID.
>>>
>>> If you have to generate a human-readable quotenumber as you describe,
>>> write some VBA code. Search the web for the "DMax+1" technique.
>>> Keywords: BeforeInsert, DMax
>>>
>>> -Tom.
>>> Microsoft Access MVP
>>>
>>>
>>>>Hi,
>>>>
>>>>My MDB needs to be distributed to our 2 salesmen on their laptops. As
>>>>they
>>>>will be raising quotes with separate replicated BE I need to issue the
>>>>quote
>>>>numbers with a prefix of thier initials. The quote numbers as currently
>>>>generated sequentially via a macro and update query which updates the
>>>>number
>>>>in the table. With one BE, this works a treat, but now I need to be
>>>>able to
>>>>keep the quote numbers unique as these will be linked to the orders.
>>>>
>>>>Any help would be appreciated.
>>>>
>>>>Thanks in advance
>>>>
>>>>Charlie
>>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding 1 to each following cells with a prefix cpliu Microsoft Excel Discussion 5 29th May 2009 10:33 PM
Adding Autonumber with a prefix =?Utf-8?B?QUpDQg==?= Microsoft Access 4 4th Nov 2007 01:43 PM
Adding Prefix =?Utf-8?B?RnJlc2htYW4=?= Microsoft Excel Worksheet Functions 4 4th Sep 2006 08:26 AM
Adding zero prefix to no's =?Utf-8?B?Q2hlcnlsIFc=?= Microsoft Excel Misc 4 31st May 2005 02:35 AM
Adding a prefix =?Utf-8?B?Q2hyaXM=?= Microsoft Excel Misc 3 29th Apr 2004 01:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:10 AM.