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 
Run Pub Func From Another Form
Dan Jackson 
            
3 years ago
Another one fixed as I was posting! See below for the answer. So Dumb!

============================================

Hi Guys,

I'm just getting into public functions. I have a button on FormA to open FormB(FiguresF).

I've used openform to open it, set a combobox value and the third and final step is to run a function called "RequeryList"

I know RequeryList runs fine because it happens on the combobox AFTER UPDATE but i also need it to run from the Button on FormA

Trying to reference the form directly:
Forms!FiguresF.RequeryList
generates Run-Time Error 2465 Application-defined or object-defined error


Trying to reference the listbox object itself:
Forms!FiguresF!List_Figures.RequeryList
Generates Run-Time Error 438 Object doesn't support this propety or method

=============================================

Answer: Yeah, the function didn't need to be directed to FormB or its objects. I simply called RequeryList and it applied it automatically because FormB was referenced in the function itself.

Hope this helps anyone else out
Richard Rost  @Reply  
           
3 years ago
Yuuup! See... ain't it cool to figure this stuff out on your own? :)
Dan Jackson OP  @Reply  
            
3 years ago
I was about to post this in another post but this is just as good here.

I started working on this annoying DCount thing about 10am this morning. It is now 15.48 and it FINALLY makes sense. I have mastered my evil half brother!!! (Yes, in an earlier post, you scolding me for using "Year" and "Month", my bad, so i corrected it)

=DCount("*","FiguresQ","Telesales=""" & [Combo_FilterTelesales] & """ AND Status=""Appt Made"" And FilterYear=""" & [Combo_FilterYear] & """ And FilterMonth=""" & [Combo_FilterMonth] & """")

Can't tell you how many flicking back and forth between design view/form view/query views I did! But determination won the day. One (Of the many) issues I had was that I was treating FMonth and FYear as numerical but they were actually strings. One of those days spent scratching your head raw!

I'm going for a lie down
Dan Jackson OP  @Reply  
            
3 years ago
P.S, fortunately, you are my only source of education r.e. Access. This is on you baby
Richard Rost  @Reply  
           
3 years ago
Hahaha. Glad you persevered. :)

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:19:22 PM. PLT: 1s