Rocky Smolin at Beach Access Software
rockysmolin at bchacc.com
Tue Feb 27 12:21:56 CST 2007
Gary: No, the "+" sign is not part of the input. Access is stripping it off. I entered +50 and in the before update event tried both MsgBox Left(Me.QuantityDue, 1) and MsgBox Left(Trim(str(Me.QuantityDue)), 1) and both printed 5. Rocky -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gary Kjos Sent: Tuesday, February 27, 2007 9:56 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Increment or replace? You can't just do an instring function in the before update event for the control and if you find a + or - sign add the value and if you don't you replace it? Or even a left or a right to compare for a + or - sign? then do the corresponding math or replacement? GK On 2/27/07, Rocky Smolin at Beach Access Software <rockysmolin at bchacc.com> wrote: > Well, I slept on it but it didn't do any good. It's JC's fault. This > was working just fine as an unbound form :o) > > So I think for each field where I need this capability, I have to use > a popup form triggered by the click event, collect the number from the > user as text and process it. > > Any better ideas anyone? > > TIA > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kath > Pelletti > Sent: Monday, February 26, 2007 4:28 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Increment or replace? > > Rocky - it sounds a little strange to me that they can add to a field > by overtyping it with an additional amount (maybe I have > misunderstood). Do you mean that the field might hold eg. 100 and if > they type +10 then the result should be 110? If they just type 10 then > it should replace the 100 with the 10? > > If that's right then I think I would separate the fields and have the > additional amounts (plus or minus) in a sep. text box. They could > still replace the entire amount by overwriting the original amount. > > Kath > ----- Original Message ----- > From: Rocky Smolin at Beach Access Software > To: 'Access Developers discussion and problem solving' > Sent: Tuesday, February 27, 2007 11:04 AM > Subject: Re: [AccessD] Increment or replace? > > > Kath: > > I need them to be able to either add to or replace the value. This > is a continuous form, BTW. > > Rocky > > > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kath > Pelletti > Sent: Monday, February 26, 2007 2:56 PM > To: Access Developers discussion and problem solving > Subject: Re: [AccessD] Increment or replace? > > Rocky - couldn't you assume the + sign as the default? Only subtract > IF they enter a minus sign? > > Kath > ----- Original Message ----- > From: Rocky Smolin at Beach Access Software > To: 'Access Developers discussion and problem solving' > Sent: Tuesday, February 27, 2007 9:42 AM > Subject: [AccessD] Increment or replace? > > > Dear List: > > I have a text box on a sub form bound to a numeric field which contains, > obviously, a numeric quantity. > > If the user inputs a value in this box preceded by a '+' or '-' > sign, I want > to add or subtract the value entered from the current value. If > they enter > a value without a preceding sign, I want to replace old the value > with the > input value. > > I can obviously see if they entered a minus sign because the number is > negative. But how can I know if they preceded the input value with > a '+'? > > MTIA > > Rocky > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.4/702 - Release Date: > 2/25/2007 > 3:16 PM > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 268.18.4/702 - Release Date: > 2/25/2007 > 3:16 PM > > > -- > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > -- Gary Kjos garykjos at gmail.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.4/703 - Release Date: 2/26/2007 2:56 PM