By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,454 Members | 3,208 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,454 IT Pros & Developers. It's quick & easy.

How to Increase a variable by one

P: 31
I have an integer variable called intInvNum.

I want to increase the number by one.

This is my code that is not working with the brackets showing testing results.

MsgBox intInvNum (number is say 500)

intInvNum = intInvNum + 1

MsbBox intInvNum (number is 1)

I am sure this is simple but I can't get it to work for some reason

Many thanks
Dec 16 '08 #1
Share this Question
Share on Google+
1 Reply

P: 31
I feel so stupid - I had mixed up my field and variable names.
It should have been
MsgBox intInvNo (number is say 500)

intInvNo = intInvNo + 1

MsbBox intInvNo (number is 501)

InvNum is the field name!
Dec 16 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.