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

Problems with Dashes in Access

P: 2
I am not a programmer but I know enough to be dangerous. My companies software developer says that we cannot use dashes in product codes, but he can't explain why.

I know that it can be done, I have done it before, I am assuming that he created something in his original programming that does not allow for the use of dashes.

Can anyone tell me how to correct this, or how to fix this issue?

Running Access 2003, I believe the database was built in Access 97.

Please Help!!!!

B1222
May 31 '07 #1
Share this Question
Share on Google+
6 Replies

Rabbit
Expert Mod 10K+
P: 12,441
I am not a programmer but I know enough to be dangerous. My companies software developer says that we cannot use dashes in product codes, but he can't explain why.

I know that it can be done, I have done it before, I am assuming that he created something in his original programming that does not allow for the use of dashes.

Can anyone tell me how to correct this, or how to fix this issue?

Running Access 2003, I believe the database was built in Access 97.

Please Help!!!!

B1222
I've never had problems with dashes. If he's storing it as a number then that may be why. But it's a product code, so there's really never any time it will be treated as a number. If he programmed it to remove dashes then you'll have to look through the code to find the function/sub. Better yet, see if you can find the event that triggers the removal. That would narrow it down for you.
May 31 '07 #2

missinglinq
Expert 2.5K+
P: 3,532
My guess would be that the developer made the elementary mistake of defining the product codes as Numerical! Although they contain "numbers" such things as phone "numbers" and Social Security "numbers" and Product Code "numbers" aren't actually "numbers!" Only "numbers" that are going to be used in mathematical operations should be defined as numerical. If you have access to the underlying table, try this:

1) Back up your database!!!

2) Go into the Design View for the table and change the data definition to TEXT

3) Now go into your form and try entering a Product Code with the aforementioned hyphen!

Let us know if this doesn't work!

Good Luck!

Addendum: Sorry, the Rabbit "hopped" in while I was responding, but essentially we said the same thing! What's really upsetting to me anyway, is the statement that "he can't explain why." Maybe your company needs to take a look at who's handling their IT requirements!
May 31 '07 #3

LacrosseB0ss
100+
P: 113
"Can't explain why" is code for "requesting something else will make me {the developer talking} do more work and I'm just too lazy'.
May 31 '07 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
I've never had problems with dashes. If he's storing it as a number then that may be why. But it's a product code, so there's really never any time it will be treated as a number. If he programmed it to remove dashes then you'll have to look through the code to find the function/sub. Better yet, see if you can find the event that triggers the removal. That would narrow it down for you.
He may have stored it as numbers to allow for the incrementing of codes, however there are some easy ways around this.

Essentially if a developer says they cannot do something they should be able to explain why. Legitimate reason would be that it would adversely affect the overall structure of the database to change it now. However, that would be a mangement decision as the time cost of those changes would be yours.

There are work arounds for almost everything but I will often tell a client that it is not worth trying to implement something based on how it will affect the overall database structure or logic. I will always give a full explanation of why though.

At the very least here though the product code even if stored as a number could be displayed with dashes.

Mary
Jun 1 '07 #5

P: 2
Thanks to all. I didn't really have access to make changes to the database, so I had to do some trickery; but I was able to change and rename files to allow for the use of dashes.

It was quite a simple fix, I probably should have thought of it on my own. Thanks for all of your input....I think I found a new website to Bookmark.

B1222
Jun 1 '07 #6

MMcCarthy
Expert Mod 10K+
P: 14,534
Thanks to all. I didn't really have access to make changes to the database, so I had to do some trickery; but I was able to change and rename files to allow for the use of dashes.

It was quite a simple fix, I probably should have thought of it on my own. Thanks for all of your input....I think I found a new website to Bookmark.

B1222
You're welcome

Glad you got it sorted.
Jun 1 '07 #7

Post your reply

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