Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2007, 07:11 AM
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default How to refesh Data in Master Form

Hi,

i am having a problem regarding popup form and master form, and i have tried too many things but could not succeed. so i am requesting for any solutions, so thanks in advance for considering my problem

i have one Master form : frmEnrollment and one Subform on it : frmEnrollmentVsEducation

now on frmEnrollmentVsEducation, i have a combobox named : InstituteID and one "add new Institute" button near it, to allow user to add new institute if they are not in list.

when user press this button, form frmInstitute pops up in add new mode and adds new Institute Details.

problem : after adding new Institute, pop up form (frmInstitute) is closed but my parent form's Combo box (InstituteID) does not reflect that newly added record automatically.

can plz any one suggest how to refresh my parent form's combox automatically to that i do not require to add refresh button everywhere, i have too many combo boxes in my project and i am facing same problem for every combo box.

thanks for your consideration, all suggestion are welcome

ashok sharma



Reply With Quote
  #2 (permalink)  
Old July 17th, 2007, 10:32 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think that if you create a procedure in the GotFocus event of the master form, you could have the form refresh its data when it comes back to the front.

Something like this:

Private Sub Form_GotFocus()
DoCmd.Requery
End Sub

Have you tried that yet?

Shane
Reply With Quote
  #3 (permalink)  
Old July 18th, 2007, 12:14 AM
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default

thanx shane for your reply,

i have tried this, but this have a slight problem, that this event will fire everytime my form got focus.

my problem was to refresh my list only when i add new institute with popup form.

thanx once again

ashok sharma
Reply With Quote
  #4 (permalink)  
Old July 18th, 2007, 08:40 AM
Registered User
 
Join Date: Jul 2007
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Then you could place the procedure in the (frmInstitute) Add button's onClick or MouseUp event.....?

Does the Add button close the frmInstitute form? If so, you could place the procedure in the Close event of the frmInstitute form.

Hope this helps,

Shane
Reply With Quote
  #5 (permalink)  
Old July 19th, 2007, 06:35 AM
Authorized User
 
Join Date: Feb 2006
Location: jaipur, rajasthan, India.
Posts: 67
Thanks: 7
Thanked 0 Times in 0 Posts
Send a message via Yahoo to beetle_jaipur
Default

Thanx NassauBob

for your suggestion, i got the solution, and the solution is to add a common function in module which checks that the parent form is opened or not, if it is opened, it requery the data in the combo box and closes the pop up form.
therefore the parent form's combo box is also synchronized with new entry

thanks again for your consideration and help

ashok sharma

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem accessing Request.Form with Master Pages kittu_asa ASP.NET 2.0 Basics 1 February 28th, 2008 09:38 AM
Problem accessing Request.Form with Master Pages niceFEPF ASP.NET 2.0 Basics 7 February 14th, 2008 04:25 PM
retriving data from master tables ali_md SQL Server 2000 0 January 31st, 2006 07:23 AM



All times are GMT -4. The time now is 07:01 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.