Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Forums > Access Forum > Default Value with IF command by Asteropi Papadopoulou
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Default Value with IF command
Asteropi Papadopoulou 
   
2 years ago
I'm trying to set up a Customer Code field based on customer type.
So I set up the customer code to create a default random value, but I want it to alternate the first initial based on the customer type it will be getting from another field.
I realised Default values cannot be dependent on another field as it is autogenerated the moment the new entry is created. However, I still need it to work like that, so is there any way to circumvent that?
Kevin Robertson  @Reply  
          
2 years ago
Asteropi Papadopoulou OP  @Reply  
   
2 years ago
That doesn't quite work. In this video it starts with a default value which was given by the previous record. But in essence I will probably have to change that in every record and it kinda moots the process

What I want is to start with a completely blank record, then choose my customer type from a bound field box -> feed that to an unbound box to get the first initial -> feed that to my customer code to generat the code with X intial and my bunch of numbers and make it indexed with no duplicates(no idea if it should be bound or not) and then feed that back to my table.

So far I have only managed steps 1-2. I did manage to get step 3, but it's not indexed and it doesn't feed that bcak to the table.

In fact I would like to do the same process with Orders sums. I managed to set up my forms beautifully but it doesn't feed the info back to the tables and I would like to have all the info there.

Any more ideas?
Richard Rost  @Reply  
           
2 years ago
That should all be possible... you'll just need to code it each step of the way. Then when you have the final code, DLookup it to see if it's already in the table. If so, regenerate the random number and try again.

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

Next Unseen

 
 
What's This?

 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/15/2026 7:48:00 AM. PLT: 1s