Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Open Form
Peter Brauns 
    
4 years ago
While experimenting with the Genealogy Data Base I removed the childF subform from the personF and tried to open it as form with a command button. When i use the command button it returns form with no data however if i open the form by double clicking it the form returns the correct data. Help
Adam Schwanz  @Reply  
           
4 years ago
What is the code on the button?
Peter Brauns OP  @Reply  
    
4 years ago
DoCmd.OpenForm "ChildF", , , "PersonID=" & PersonID
Adam Schwanz  @Reply  
           
4 years ago
Ok, and personID is on the main form? And its a number, not a string(short text)?
Peter Brauns OP  @Reply  
    
4 years ago
yes, I basically cut the childf  subform from the personf form and added cmd button
Adam Schwanz  @Reply  
           
4 years ago
Just to rule out the obvious mundane stuff, spelling is all good And the field on ChildF is called PersonID as well right?  

Its something off in your where clause if you can open the form and have data elsewhere.

Try 'PersonID=''' & PersonID & ''''
Just to rule it out
Adam Schwanz  @Reply  
           
4 years ago
And personID isnt a combo box right? If it is, whats the rowsource and bound column?
Adam Schwanz  @Reply  
           
4 years ago
My phone wont type correct characters lol its 3 double quotes then & personid & 4 Double quotes
Peter Brauns OP  @Reply  
    
4 years ago
it was the quotes I'm to new to figure out exactly what they did but it works great now
Peter Brauns OP  @Reply  
    
4 years ago
THANKS A LOT
Adam Schwanz  @Reply  
           
4 years ago
No Problem, if it was the "PersonID=""" & PersonID & """"
That just means that the PersonID field is a short text field instead of a number, so you have to use double double quotes when you concatenate it, if you want to watch a video on that, heres one: Double Double Quotes

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

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: 5/6/2026 9:15:13 PM. PLT: 0s