Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Incrementing Invoice Number

 
Goto page 1, 2
   Database Help (Home) -> MS Access RSS
Next:  amine  
Author Message
Bob Vance

External


Since: Mar 25, 2008
Posts: 180



(Msg. 1) Posted: Tue Dec 30, 2008 5:26 pm
Post subject: Incrementing Invoice Number
Archived from groups: microsoft>public>access (more info?)

When I create my Invoice I have 2 choices an Invoice number or Not and that
works just great, BUT if I open my Invoice again and add a charge when I
close my form it changes my Invoice Number from say 122 to 123, If my
invoice is Zero and add a charge to my Invoice its not a problem, this is
part of my code that must be wrong.........Thanks Bob

If fraSelectInvoiceNoType = 1 Then
recInvoice.Fields("InvoiceNo") = NextInvoiceNo
ElseIf fraSelectInvoiceNoType = 2 Then
recInvoice.Fields("InvoiceNo") = 0
End If


--
Thanks in advance for any help with this......Bob
MS Access 2007 accdb
Windows XP Home Edition Ver 5.1 Service Pack 3

 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Pete D.

External


Since: Mar 08, 2008
Posts: 210



(Msg. 2) Posted: Tue Dec 30, 2008 6:03 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Could we see the rest of the code? Don't know the context of the if
statement. Or I'm just dense and that would be normal.
"Bob Vance" wrote in message

> When I create my Invoice I have 2 choices an Invoice number or Not and
> that works just great, BUT if I open my Invoice again and add a charge
> when I close my form it changes my Invoice Number from say 122 to 123, If
> my invoice is Zero and add a charge to my Invoice its not a problem, this
> is part of my code that must be wrong.........Thanks Bob
>
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
>
>
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
>
>

 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Arvin Meyer [MVP]

External


Since: Oct 02, 2008
Posts: 266



(Msg. 3) Posted: Tue Dec 30, 2008 6:37 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Add another condition:

If Me.NewRecord = True Then
If fraSelectInvoiceNoType = 1 Then
recInvoice.Fields("InvoiceNo") = NextInvoiceNo
ElseIf fraSelectInvoiceNoType = 2 Then
recInvoice.Fields("InvoiceNo") = 0
End If
End If
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Bob Vance" wrote in message

> When I create my Invoice I have 2 choices an Invoice number or Not and
> that works just great, BUT if I open my Invoice again and add a charge
> when I close my form it changes my Invoice Number from say 122 to 123, If
> my invoice is Zero and add a charge to my Invoice its not a problem, this
> is part of my code that must be wrong.........Thanks Bob
>
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
>
>
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Pete D.

External


Since: Mar 08, 2008
Posts: 210



(Msg. 4) Posted: Tue Dec 30, 2008 6:54 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Why is it so obvious when you do that and I didn't see it. ; (

"Arvin Meyer [MVP]" wrote in message

> Add another condition:
>
> If Me.NewRecord = True Then
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
> End If
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "Bob Vance" wrote in message
>
>> When I create my Invoice I have 2 choices an Invoice number or Not and
>> that works just great, BUT if I open my Invoice again and add a charge
>> when I close my form it changes my Invoice Number from say 122 to 123, If
>> my invoice is Zero and add a charge to my Invoice its not a problem, this
>> is part of my code that must be wrong.........Thanks Bob
>>
>> If fraSelectInvoiceNoType = 1 Then
>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>> ElseIf fraSelectInvoiceNoType = 2 Then
>> recInvoice.Fields("InvoiceNo") = 0
>> End If
>>
>>
>> --
>> Thanks in advance for any help with this......Bob
>> MS Access 2007 accdb
>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Arvin Meyer [MVP]

External


Since: Oct 02, 2008
Posts: 266



(Msg. 5) Posted: Tue Dec 30, 2008 7:16 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Because a different set of eyes is sometimes what's needed. I'm sure you've
heard the expression "Two heads are better than one" This is an example of
what that means. Next time, you may see one that I don't.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Pete D." wrote in message

> Why is it so obvious when you do that and I didn't see it. ; (
>
> "Arvin Meyer [MVP]" wrote in message
>
>> Add another condition:
>>
>> If Me.NewRecord = True Then
>> If fraSelectInvoiceNoType = 1 Then
>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>> ElseIf fraSelectInvoiceNoType = 2 Then
>> recInvoice.Fields("InvoiceNo") = 0
>> End If
>> End If
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>> "Bob Vance" wrote in message
>>
>>> When I create my Invoice I have 2 choices an Invoice number or Not and
>>> that works just great, BUT if I open my Invoice again and add a charge
>>> when I close my form it changes my Invoice Number from say 122 to 123,
>>> If my invoice is Zero and add a charge to my Invoice its not a problem,
>>> this is part of my code that must be wrong.........Thanks Bob
>>>
>>> If fraSelectInvoiceNoType = 1 Then
>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>> recInvoice.Fields("InvoiceNo") = 0
>>> End If
>>>
>>>
>>> --
>>> Thanks in advance for any help with this......Bob
>>> MS Access 2007 accdb
>>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>>
>>>
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Pete D.

External


Since: Mar 08, 2008
Posts: 210



(Msg. 6) Posted: Tue Dec 30, 2008 7:31 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

That was nice...I'm sure it could have nothing to do with experience or any
thing like that. Thanks for the "polite" lesson!

"Arvin Meyer [MVP]" wrote in message

> Because a different set of eyes is sometimes what's needed. I'm sure
> you've heard the expression "Two heads are better than one" This is an
> example of what that means. Next time, you may see one that I don't.
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
>
> "Pete D." wrote in message
>
>> Why is it so obvious when you do that and I didn't see it. ; (
>>
>> "Arvin Meyer [MVP]" wrote in message
>>
>>> Add another condition:
>>>
>>> If Me.NewRecord = True Then
>>> If fraSelectInvoiceNoType = 1 Then
>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>> recInvoice.Fields("InvoiceNo") = 0
>>> End If
>>> End If
>>> --
>>> Arvin Meyer, MCP, MVP
>>> http://www.datastrat.com
>>> http://www.mvps.org/access
>>> http://www.accessmvp.com
>>>
>>> "Bob Vance" wrote in message
>>>
>>>> When I create my Invoice I have 2 choices an Invoice number or Not and
>>>> that works just great, BUT if I open my Invoice again and add a charge
>>>> when I close my form it changes my Invoice Number from say 122 to 123,
>>>> If my invoice is Zero and add a charge to my Invoice its not a problem,
>>>> this is part of my code that must be wrong.........Thanks Bob
>>>>
>>>> If fraSelectInvoiceNoType = 1 Then
>>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>>> recInvoice.Fields("InvoiceNo") = 0
>>>> End If
>>>>
>>>>
>>>> --
>>>> Thanks in advance for any help with this......Bob
>>>> MS Access 2007 accdb
>>>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>>>
>>>>
>>>
>>>
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
aaron.kempf

External


Since: Apr 09, 2008
Posts: 457



(Msg. 7) Posted: Tue Dec 30, 2008 8:14 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In Microsoft's own words....
The following comes from Microsoft article Q300216.

-----------------------------------------------------------------------------------------------------------------------------------------------------------
"Microsoft Jet is a file-sharing database system. A file-sharing
database is one in which all the processing of the file
takes place at the client. When a file-sharing database, such as
Microsoft Jet, is used in a multiuser environment,
multiple client processes are using file read, write, and locking
operations on the same shared file across a network. If,
for any reason, a process cannot be completed, the file can be left in
an incomplete or a corrupted state. Two
examples of when a process may not be completed is when a client is
terminated unexpectedly or when a network
connection to a server is dropped.

Microsoft Jet is not intended to be used with high-stress, high-
concurrency, 24x7 server applications, such as Web,
commerce, transactional, and messaging servers. For these type of
applications, the best solution is to switch to a true
client/server-based database system such as Microsoft Data Engine
(MSDE) or Microsoft SQL Server. When you use
Microsoft Jet in high-stress applications such as Microsoft Internet
Information Server (IIS), customers have reported
database corruption, stability issues such as IIS crashing or locking
up, and also a sudden and persistent failure of the
driver to connect to a valid database that requires re-starting the
IIS service."
-----------------------------------------------------------------------------------------------------------------------------------------------------------



On Dec 30, 2:18 pm, "Bob Vance" wrote:
> When I create my Invoice I have 2 choices an Invoice number or Not and that
> works just great, BUT if I open my Invoice again and add a charge when I
> close my form it changes my Invoice Number from say 122 to 123, If my
> invoice is Zero and add a charge to my Invoice its not a problem, this is
> part of my code that must be wrong.........Thanks Bob
>
> If fraSelectInvoiceNoType = 1 Then
>             recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>         ElseIf fraSelectInvoiceNoType = 2 Then
>             recInvoice.Fields("InvoiceNo") = 0
>         End If
>
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows  XP Home Edition Ver 5.1 Service Pack 3
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Gina Whipp

External


Since: Jul 31, 2007
Posts: 86



(Msg. 8) Posted: Tue Dec 30, 2008 11:21 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The title to which Aaron refers to is:

How to keep a Jet 4.0 database in top working condition in Access 2000

Link: http://support.microsoft.com/kb/300216

Maybe you could find something more recent and pertinent?
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

"a a r o n . k e m p f @ g m a i l . c o m" wrote in
message

In Microsoft's own words....
The following comes from Microsoft article Q300216.

-----------------------------------------------------------------------------------------------------------------------------------------------------------
"Microsoft Jet is a file-sharing database system. A file-sharing
database is one in which all the processing of the file
takes place at the client. When a file-sharing database, such as
Microsoft Jet, is used in a multiuser environment,
multiple client processes are using file read, write, and locking
operations on the same shared file across a network. If,
for any reason, a process cannot be completed, the file can be left in
an incomplete or a corrupted state. Two
examples of when a process may not be completed is when a client is
terminated unexpectedly or when a network
connection to a server is dropped.

Microsoft Jet is not intended to be used with high-stress, high-
concurrency, 24x7 server applications, such as Web,
commerce, transactional, and messaging servers. For these type of
applications, the best solution is to switch to a true
client/server-based database system such as Microsoft Data Engine
(MSDE) or Microsoft SQL Server. When you use
Microsoft Jet in high-stress applications such as Microsoft Internet
Information Server (IIS), customers have reported
database corruption, stability issues such as IIS crashing or locking
up, and also a sudden and persistent failure of the
driver to connect to a valid database that requires re-starting the
IIS service."
-----------------------------------------------------------------------------------------------------------------------------------------------------------



On Dec 30, 2:18 pm, "Bob Vance" wrote:
> When I create my Invoice I have 2 choices an Invoice number or Not and
> that
> works just great, BUT if I open my Invoice again and add a charge when I
> close my form it changes my Invoice Number from say 122 to 123, If my
> invoice is Zero and add a charge to my Invoice its not a problem, this is
> part of my code that must be wrong.........Thanks Bob
>
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
>
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Walt Kowalski

External


Since: Dec 29, 2008
Posts: 4



(Msg. 9) Posted: Tue Dec 30, 2008 11:21 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Gina Whipp" wrote to aaron:

> Maybe you could find something more recent and pertinent?

Miss Gina, it's been explained to me that boy's mentally unbalanced. If he'd
had the guts to join and fight, they might call it shell-shock and the VA
could help him.

You can call me Walt. I like your style.
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Bob Vance

External


Since: Mar 25, 2008
Posts: 180



(Msg. 10) Posted: Wed Dec 31, 2008 1:25 am
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

BRILLIANT Arvin, Thank you very much....Regards Bob Smile

"Arvin Meyer [MVP]" wrote in message

> Add another condition:
>
> If Me.NewRecord = True Then
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
> End If
> --
> Arvin Meyer, MCP, MVP
> http://www.datastrat.com
> http://www.mvps.org/access
> http://www.accessmvp.com
>
> "Bob Vance" wrote in message
>
>> When I create my Invoice I have 2 choices an Invoice number or Not and
>> that works just great, BUT if I open my Invoice again and add a charge
>> when I close my form it changes my Invoice Number from say 122 to 123, If
>> my invoice is Zero and add a charge to my Invoice its not a problem, this
>> is part of my code that must be wrong.........Thanks Bob
>>
>> If fraSelectInvoiceNoType = 1 Then
>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>> ElseIf fraSelectInvoiceNoType = 2 Then
>> recInvoice.Fields("InvoiceNo") = 0
>> End If
>>
>>
>> --
>> Thanks in advance for any help with this......Bob
>> MS Access 2007 accdb
>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Bob Vance

External


Since: Mar 25, 2008
Posts: 180



(Msg. 11) Posted: Wed Dec 31, 2008 1:25 am
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oops it is not changing the invoice number when I open the form and close it
But If I create a new Invoice with the option to give it a number it will
only give it a zero..Regards Bob
"Bob Vance" wrote in message

> BRILLIANT Arvin, Thank you very much....Regards Bob Smile
>
> "Arvin Meyer [MVP]" wrote in message
>
>> Add another condition:
>>
>> If Me.NewRecord = True Then
>> If fraSelectInvoiceNoType = 1 Then
>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>> ElseIf fraSelectInvoiceNoType = 2 Then
>> recInvoice.Fields("InvoiceNo") = 0
>> End If
>> End If
>> --
>> Arvin Meyer, MCP, MVP
>> http://www.datastrat.com
>> http://www.mvps.org/access
>> http://www.accessmvp.com
>>
>> "Bob Vance" wrote in message
>>
>>> When I create my Invoice I have 2 choices an Invoice number or Not and
>>> that works just great, BUT if I open my Invoice again and add a charge
>>> when I close my form it changes my Invoice Number from say 122 to 123,
>>> If my invoice is Zero and add a charge to my Invoice its not a problem,
>>> this is part of my code that must be wrong.........Thanks Bob
>>>
>>> If fraSelectInvoiceNoType = 1 Then
>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>> recInvoice.Fields("InvoiceNo") = 0
>>> End If
>>>
>>>
>>> --
>>> Thanks in advance for any help with this......Bob
>>> MS Access 2007 accdb
>>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>>
>>>
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Gina Whipp

External


Since: Jul 31, 2007
Posts: 86



(Msg. 12) Posted: Wed Dec 31, 2008 9:20 am
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

MR. Walt...

While your statement about his mental health is true, I only offer the link
as a retraction to his.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II
"Walt Kowalski" wrote in message

> "Gina Whipp" wrote to aaron:
>
> > Maybe you could find something more recent and pertinent?
>
> Miss Gina, it's been explained to me that boy's mentally unbalanced. If
> he'd
> had the guts to join and fight, they might call it shell-shock and the VA
> could help him.
>
> You can call me Walt. I like your style.
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Arvin Meyer [MVP]

External


Since: Oct 02, 2008
Posts: 266



(Msg. 13) Posted: Wed Dec 31, 2008 5:27 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While all of that information is basically true, it neglects to mention that
a split database, rarely corrupts because nothing is shared except the data,
and that is locked by the user currently writing to that record or page.

While it alludes to network server connections being dropped as a cause for
corruption, it neglects to mention that tables without memo fields being
written to rarely corrupt, even with dropped connections. It also doesn't
mention that high quality networks, rarely drop a connection. Further, it
doesn't mention that transactional processing from unbound forms with
rollback will almost never have a problem either.

So databases designed by intelligent professionals, almost never suffer from
any of the problems mentioned. That said, if there is a mission critical
application that requires high security on a 24/7 basis, it makes sense to
spend the extra money for software, hardware, and administration to set up
and run a full SQL-Server application.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"a a r o n . k e m p f @ g m a i l . c o m" wrote in
message

In Microsoft's own words....
The following comes from Microsoft article Q300216.

-----------------------------------------------------------------------------------------------------------------------------------------------------------
"Microsoft Jet is a file-sharing database system. A file-sharing
database is one in which all the processing of the file
takes place at the client. When a file-sharing database, such as
Microsoft Jet, is used in a multiuser environment,
multiple client processes are using file read, write, and locking
operations on the same shared file across a network. If,
for any reason, a process cannot be completed, the file can be left in
an incomplete or a corrupted state. Two
examples of when a process may not be completed is when a client is
terminated unexpectedly or when a network
connection to a server is dropped.

Microsoft Jet is not intended to be used with high-stress, high-
concurrency, 24x7 server applications, such as Web,
commerce, transactional, and messaging servers. For these type of
applications, the best solution is to switch to a true
client/server-based database system such as Microsoft Data Engine
(MSDE) or Microsoft SQL Server. When you use
Microsoft Jet in high-stress applications such as Microsoft Internet
Information Server (IIS), customers have reported
database corruption, stability issues such as IIS crashing or locking
up, and also a sudden and persistent failure of the
driver to connect to a valid database that requires re-starting the
IIS service."
-----------------------------------------------------------------------------------------------------------------------------------------------------------



On Dec 30, 2:18 pm, "Bob Vance" wrote:
> When I create my Invoice I have 2 choices an Invoice number or Not and
> that
> works just great, BUT if I open my Invoice again and add a charge when I
> close my form it changes my Invoice Number from say 122 to 123, If my
> invoice is Zero and add a charge to my Invoice its not a problem, this is
> part of my code that must be wrong.........Thanks Bob
>
> If fraSelectInvoiceNoType = 1 Then
> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
> ElseIf fraSelectInvoiceNoType = 2 Then
> recInvoice.Fields("InvoiceNo") = 0
> End If
>
> --
> Thanks in advance for any help with this......Bob
> MS Access 2007 accdb
> Windows XP Home Edition Ver 5.1 Service Pack 3
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Bob Vance

External


Since: Mar 25, 2008
Posts: 180



(Msg. 14) Posted: Wed Dec 31, 2008 6:25 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks Arvin got it going just had to put that code in again as there was 2
places it was sitting....Regards Bob

"Bob Vance" wrote in message

> Oops it is not changing the invoice number when I open the form and close
> it But If I create a new Invoice with the option to give it a number it
> will only give it a zero..Regards Bob
> "Bob Vance" wrote in message
>
>> BRILLIANT Arvin, Thank you very much....Regards Bob Smile
>>
>> "Arvin Meyer [MVP]" wrote in message
>>
>>> Add another condition:
>>>
>>> If Me.NewRecord = True Then
>>> If fraSelectInvoiceNoType = 1 Then
>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>> recInvoice.Fields("InvoiceNo") = 0
>>> End If
>>> End If
>>> --
>>> Arvin Meyer, MCP, MVP
>>> http://www.datastrat.com
>>> http://www.mvps.org/access
>>> http://www.accessmvp.com
>>>
>>> "Bob Vance" wrote in message
>>>
>>>> When I create my Invoice I have 2 choices an Invoice number or Not and
>>>> that works just great, BUT if I open my Invoice again and add a charge
>>>> when I close my form it changes my Invoice Number from say 122 to 123,
>>>> If my invoice is Zero and add a charge to my Invoice its not a problem,
>>>> this is part of my code that must be wrong.........Thanks Bob
>>>>
>>>> If fraSelectInvoiceNoType = 1 Then
>>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>>> recInvoice.Fields("InvoiceNo") = 0
>>>> End If
>>>>
>>>>
>>>> --
>>>> Thanks in advance for any help with this......Bob
>>>> MS Access 2007 accdb
>>>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>>>
>>>>
>>>
>>>
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Bob Vance

External


Since: Mar 25, 2008
Posts: 180



(Msg. 15) Posted: Wed Dec 31, 2008 7:25 pm
Post subject: Re: Incrementing Invoice Number [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sorry Arvin , It is not giving me a Invoice Number when I select it too,
thought I had fixed it but hadnt ....Regards Bob

"Bob Vance" wrote in message

> Thanks Arvin got it going just had to put that code in again as there was
> 2 places it was sitting....Regards Bob
>
> "Bob Vance" wrote in message
>
>> Oops it is not changing the invoice number when I open the form and close
>> it But If I create a new Invoice with the option to give it a number it
>> will only give it a zero..Regards Bob
>> "Bob Vance" wrote in message
>>
>>> BRILLIANT Arvin, Thank you very much....Regards Bob Smile
>>>
>>> "Arvin Meyer [MVP]" wrote in message
>>>
>>>> Add another condition:
>>>>
>>>> If Me.NewRecord = True Then
>>>> If fraSelectInvoiceNoType = 1 Then
>>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>>> recInvoice.Fields("InvoiceNo") = 0
>>>> End If
>>>> End If
>>>> --
>>>> Arvin Meyer, MCP, MVP
>>>> http://www.datastrat.com
>>>> http://www.mvps.org/access
>>>> http://www.accessmvp.com
>>>>
>>>> "Bob Vance" wrote in message
>>>>
>>>>> When I create my Invoice I have 2 choices an Invoice number or Not and
>>>>> that works just great, BUT if I open my Invoice again and add a charge
>>>>> when I close my form it changes my Invoice Number from say 122 to 123,
>>>>> If my invoice is Zero and add a charge to my Invoice its not a
>>>>> problem, this is part of my code that must be wrong.........Thanks Bob
>>>>>
>>>>> If fraSelectInvoiceNoType = 1 Then
>>>>> recInvoice.Fields("InvoiceNo") = NextInvoiceNo
>>>>> ElseIf fraSelectInvoiceNoType = 2 Then
>>>>> recInvoice.Fields("InvoiceNo") = 0
>>>>> End If
>>>>>
>>>>>
>>>>> --
>>>>> Thanks in advance for any help with this......Bob
>>>>> MS Access 2007 accdb
>>>>> Windows XP Home Edition Ver 5.1 Service Pack 3
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
 >> Stay informed about: Incrementing Invoice Number 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Incrementing number field in access - HI I am trying to create a number field that will create a unique incremented number each time a record is added to the database via a form. but I want that number to be in sequence and start from my specified number. I have tried the help in access and....

OrderNumber, Invoice Number, Credit Number - I am currently building ordering database for my business. I am currenlty use 1, 2, 3 ect for OrderNumbers Invoice Number and Credit Numbers To genetate the number i am using the following code on the Deafual setting of the field on the form ..

How to generate auto increment invoice number - Is it possible to generate auto increment invoice number where we already have existing records. If it is possible, how? Also, this database will be hosted on a website and accessed by 2 or more users - at times simultaneously. Please explain..

NWind Edit Invoice layout "Print Invoice" - How do I access the invoice form that show up when I click the "Print Invoice" button?

AutoNum not incrementing - This was working. Access 2000 on Windows 2000. I have 5 tables linked. One of my tables has an AutoNum as primary key. When I go into my form to ADD a new record, it used to go to a new record and add the record, giving it a new AutoNum number. ..
   Database Help (Home) -> MS Access All times are: Pacific Time (US & Canada)
Goto page 1, 2
Page 1 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]