PC Review


Reply
Thread Tools Rate Thread

Can't Requery a Form Control

 
 
David Altemir
Guest
Posts: n/a
 
      8th Oct 2004
I enter a value in a dialog box and want that value to be reflected in
the display of another form after I close the dialog box. This works
fine if I requery the entire form, but this causes the cursor to jump
back to the first record.

I try to requery just the particular control on the form from the
OnClose event of the dialog box as shown below but it still doesn't
show the updated value:

Forms!MyForm.ResourceName.Requery

I don't get an error message, but it still shows the old value. Any
ideas as to why I'm net getting this control to requery?
 
Reply With Quote
 
 
 
 
Van T. Dinh
Guest
Posts: n/a
 
      8th Oct 2004
You need to save a value that uniquely identifies the CurrentRecord in a VBA
variable then Requery the Form (which will make the 1st Record in the
newly-requeried Recordset the CurrentRecord). You can the use the saved
value to find the BookMark of the Record you want in the RecordsetClone and
then set the Form's BookMark to this BookMark.

Check Access VB Help on RecordsetClone & BookMark. I think there are some
sample codes in these Help topics.

--
HTH
Van T. Dinh
MVP (Access)



"David Altemir" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I enter a value in a dialog box and want that value to be reflected in
> the display of another form after I close the dialog box. This works
> fine if I requery the entire form, but this causes the cursor to jump
> back to the first record.
>
> I try to requery just the particular control on the form from the
> OnClose event of the dialog box as shown below but it still doesn't
> show the updated value:
>
> Forms!MyForm.ResourceName.Requery
>
> I don't get an error message, but it still shows the old value. Any
> ideas as to why I'm net getting this control to requery?



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Requery issue : Application closes on form.requery.... =?Utf-8?B?c3VyeWE=?= Microsoft Access Form Coding 3 6th Nov 2006 09:58 PM
Requery the 1st requery result which displayed in form vincentt via AccessMonster.com Microsoft Access 2 31st Aug 2006 03:49 AM
Re: child form not clearing after control requery in parent control Bill Taylor Microsoft Access Form Coding 0 21st Apr 2004 06:17 PM
Requery without using Me.Requery? Daniel Microsoft Access VBA Modules 3 28th Oct 2003 01:37 AM
Requery control in (main form) from (subform) Tom Microsoft Access Form Coding 1 13th Aug 2003 03:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 PM.