Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 6th, 2011, 02:15 AM
Registered User
 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access: Requery combobox in sub form

Hello to all,

I have just joined wrox forum. It’s a great effort by all team.
Now I come to my point. Recently I have worked with Access 2003 (mdb) version. Due to some reasons I have to transform myself in Access 2007. I don’t have high database expertise but worked well in 2003 format. When I started working in access 2007, it threatened me much. Anyway I tried to settled the things. One thing which has made me sick is requerying a bounded combobox placed on a sub form. I am trying desperately but outcome is nothing. Can any body explain how to use requery method for combox in subform and in which event. Looking for quick response please. Thanks in advance....
 
Old January 6th, 2011, 12:51 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Need a some more details on exactly what you are trying to do.

When do you need to requery the combo box control?

Is the sub form in single, datasheet, or continuous view?

Are you trying to requery the combo box in the sub form from the parent form?

try:

Me.[Sub Form Contyrol name].form![Combo box control name].Requery
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old January 7th, 2011, 01:47 AM
Registered User
 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok. I have Main bounded Form named "frmOrganizations". This form contains many bounded controls like textboxes, comboboxes, subforms. One of the control that frmOrganizations contained is "subformDFO" subform which contains a bounded combobox "cboDFO". In order to add/update the values of cboDFO I have another bounded form named "frmAdd" which contains a bounded textbox "txtAddDFO". Now when I add new value in txtAddDFO it must be updated in cboDFO.
I have tried your code but results are not there.

I can also mail (if you could provide me email address) you database as I have to resolve this issue in hurry. It was not tough in Access 2003 but I am not getting it in Access 2007...

Last edited by Mian Asad; January 7th, 2011 at 01:53 AM..
 
Old January 8th, 2011, 12:43 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

AFAIK, you should be able to do it the same in 2007 as you would in 2003. My forms that do this in 2003 still work the same way in 2007.

Can you post the VBA code you are using now.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old January 9th, 2011, 12:02 PM
Registered User
 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have done it. Thank you very much for your support and guideline. Actually it was just a single option that has made my life a hell. It was VBA Macro option which by default is not enabled. When I enabled that option all the vba codes started working correctly. I request you please guide other non-expert like me about this option which creates many many difficulties during code execution. Again thank you very much...
 
Old January 9th, 2011, 03:12 PM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

Ah .. the trusted locations and enabling the VBA code issue.

With Access 2007 you need to be sure and create a trusted location of the folder where you place your database.

You might also want to set the Macro Security Level to Low for each user.
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old January 10th, 2011, 01:45 AM
Registered User
 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you it helped alot
 
Old January 10th, 2011, 02:02 AM
Friend of Wrox
 
Join Date: Sep 2010
Posts: 245
Thanks: 5
Thanked 24 Times in 23 Posts
Default

This article I wrote may also help:

Trust Center in Access 2007 and 2010 Trusted Locations
__________________
Boyd Trimmell aka HiTechCoach (.com)
Microsoft Access MVP Alumni 2010-2015
 
Old January 10th, 2011, 02:07 AM
Registered User
 
Join Date: Jan 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Great... I am going to creat account in HiTech Coaching.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Form ComboBox AddItem load is slow Neal Excel VBA 3 September 10th, 2009 12:03 AM
Subform Record Saved, Update/Requery Form controls CB-VTXer Access VBA 2 August 6th, 2007 02:35 PM
Requery a Form Field from another Form rocknrisk Access 3 September 16th, 2005 03:51 PM
Adding Items to the combobox from the second form Raghavendra_Mudugal C# 7 May 12th, 2005 06:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.