Validation In Text Box

bluenose83

New Member
Joined
Aug 6, 2008
Messages
41
Morning Guys

Just wondering if its possible to validate a text box in access 2003 where by it will only allow you to start with a number and also allow characters after this.

We have a box which needs to start with the users ID number. This number is 7 digits long and then the user keys a comment. eg "1234567 - Links to blahblahblah". Causes a few issues when they dont key there ID number so just trying to limit this when they key in.

Or would this need code to work.
Cheers
Matt
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Do your users log into their computers using their employee ID?

Also, this sounds like somewhat poor design. Each field in your table should hold only one data element. By the design you've described, there would be a field holding both the ID of the user who made the update and the comment they made - two elements.
 
Upvote 0
This database is for any cases they complete. Its a notes box which they complete with their ID and then the comment they want. This is copied to another system (stupid I know).

Can I have a box with their PID and then the notes after? Then combine them into one column? Is this possible?
 
Upvote 0
You can, but, as Jon points out, that is considered poor design. It sounds like there is a table missing in your database. A table(perhaps CaseNotes or similar) whereby the Casenumber, the Noteauthor, the Notedate and the Notetext are recorded. Text fields are restricted to 255 characters. Do you have multiple Notes per Case?
You can concatenate 2 things as follows:
Pid =1234567
Notetext =" that is considered poor design. It sounds like there is a table missing in your database"
PID & Notetext

1234567that is considered poor design. It sounds like there is a table missing in your database
Good luck.
 
Upvote 0
Thanks Guys, not my database unfortunately so ive been left to try and keep it going :(

Will try this
Thanks
Matt
 
Upvote 0
Since you're stuck with what you have, you might want to consider having this field concatenate as suggested but be invisible. 2 other textboxes - 1 for the PID (which I presume is part of the form recordset) which they cannot edit and one for the notes. What goes to the other app is the concatenation which means the field is a calculated one. That way, they cannot backspace to remove the PID, nor can they forget it. Or don't show the PID field either.

What you didn't say is if notes were the sole purpose of the form. If not, then I don't imagine you want the PID info but no notes. Your calculated control would need an IIF expression I guess, so that if no note, no PID.
 
Upvote 0

Forum statistics

Threads
1,221,544
Messages
6,160,428
Members
451,645
Latest member
androidmj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top