Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Prevent Duplicates    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Using the Control Source of a Combo Box
Stephen Reynolds 
     
14 months ago
I have a table with 3 values : date, site, image link.  I want all records to be unique combinations of those.  I am having trouble inserting the 'site' value into the query argument that  counts records in my table.   The 'site' value is coming from the control source of a combo box - I cannot display that value with a MsgBox, and the VBA compile  cannot find  the variable.  What's different about using the value of a combo  box control source?
Stephen Reynolds OP  @Reply  
     
14 months ago
OK, I get it.  I need to reference the forms object, like

Me!Obs_Site_ID

It's surprising how far I've gotten on minimal learning.
Richard Rost  @Reply  
          
14 months ago
It's difficult to help without being able to see it. Maybe some screen shots? Text descriptions only go so far. Also, try not to have a field named "date". That will cause problems. Unless you mean Date() the function that returns today's date.
Stephen Reynolds OP  @Reply  
     
14 months ago
I apologize for being brief.   My 'date' field is actually named Obs_Date.   I had trouble formatting my search string correctly to accommodate a date field (had to surround with #....#) and a text field (had to put in single quotes).  I will be more clear in the future.   I have it working now.   I use both methods together - I use the Access composite unique key to positively prevent duplicates, and the VBA code on the form BeforeUpdate event - together they catch duplicates both on additions of new records, and updates to existing records.   Thanks.  

Not clear how to insert screen shots in a comment.
Richard Rost  @Reply  
          
14 months ago
My site isn't as fancy as some other ones like Facebook, so you can't put a screenshot in while you're typing in the text. But after you submit your text, I see in the bottom right corner it says "Upload Image," or at the top of the thread you'll find a link too.

I thought about adding the capability to just paste photos right into the text, but it requires a lot; it's JavaScript and back-end processing, and it's just a nightmare. What I've got now works, so I'm sticking with it until I've got a lot more time on my hands to be able to upgrade the site to that level of complexity. LOL Access is easy for me; JavaScript, not so much.
Richard Rost  @Reply  
          
14 months ago
But yes, it's much easier to help you if we can see what you're dealing with instead of just what you're describing.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 4/30/2026 4:43:07 PM. PLT: 1s