Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Sequential Numbers < Deleted AutoNumber | Customer Codes >
Back to Sequential Numbers    Comments List
Upload Images   Link   Email  
Customer Code
Dirk Merkel 
      
10 months ago
Greetings to everyone and to Richard and the guys around him: Thank you for your existence. ;-D I do enjoy your style of teaching very much.
Everything in the video works just fine. I have been building it step by step and it works perfectly. But I still manage to have a question.....
How do I get all this to work if I have to get the values for the CustomerCode from 2 or 3 cascading combo boxes. Lets say (for the sake of it) Last Name and First Name are combo boxes. Could someone point me in the right direction? Something tells me it has to be a VBA solution? Or is there another way?

Regards Dirk
Adam Schwanz 
            
10 months ago
Concatenation

Something like this if your combo boxes were called FirstName and LastName

Dim MyUniqueNumber
MyUniqueNumber = FirstName & LastName
Dirk Merkel OP 
      
10 months ago
Thanks for your quick reply. I've tried the code in the before update event. I do get the CustomerCode out of it.
Unfortunately I still end up with the ID numbers instead  text in the CustomerCode field. For example:
The goal is "DE-SN080337" (DE=CountryCombo and SN=StateCombo);
my result at the moment is "1-14080337"
One thing is clear. My newbie knowledge is not enough to figure this out. Any help is very much appreciated.
Regards Dirk
Adam Schwanz 
            
10 months ago
So do these combo boxes have an ID field and then the text in them? Like from a table? StateID/StateName kind of thing? You save the ID instead of the actual text in the table?

If so, you need to use .Column to get the right value. In the case that both of the combo boxes have a ID field as the value stored in the table, and the second column is the text value, you would do something like this with column(1) (column count starts at 0, 0 would be the ID)

CountryCombo.Column(1) & "-" & StateCombo.Column(1)
This would presumably give you something like US-FL for Florida USA.
Dirk Merkel OP 
      
10 months ago
Your assumptions are spot on. I'm going to try an let you know.
Thanks
Dirk Merkel OP 
      
10 months ago
Adam, thank you. It works nicely.
Here is an idea..... couldn't that be an additional subject in one of Richards TechHelpVideos? I can't be the only one stuck with this. hehe
Thanks again
Dirk
Richard Rost 
          
10 months ago
I know I cover combo box columns in Access Expert 22 and I'm pretty sure in the extended cut for Invoicing. But yeah... maybe they deserve their own TH video.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Sequential Numbers.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 3/23/2025 4:46:05 PM. PLT: 1s