I have a form that the user enters some information on and then clicks a
button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because
the newly saved information should now display on the sub form. I am trying
to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form
"sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information
is stored?
Thanks,
Mike 7 4057
Subforms are not open in their own right, so they are not part of the Forms
collection.
You need:
Forms![NameOfYourMainFormHere].[sub-frmRegistered_Bidders].Form.Requery
Explanation:
Referring to Controls on a Subform
at: http://allenbrowne.com/casu-04.html
Other suggestions
=============
a) If the above doesn't work, the Name of the subform control could be
different than the name of the form loaded into it (its Source Object.)
b) You may find it easier to save the form with:
RunCommand acCmdSaveRecord
or even:
If Me.Dirty Then Me.Dirty = False
c) If you have a main form and subform both bound to the same table, and the
table has an AutoNumber primary key, watch out for this bug:
Fixing AutoNumbers when Access assigns negatives or duplicates
at: http://allenbrowne.com/ser-40.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
"SBC News Groups" <me@you.netwrote in message
news:7G*******************@newssvr21.news.prodigy. com...
>I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh"
because the newly saved information should now display on the sub form. I
am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form
"sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the
information is stored?
Thansk for the replay Allen, but I still can not get it to work. I modified
my line to the following:
Forms![frmBidders].[sub-frmRegistered_Bidders].Form.Requery
With a period between the [frmBidders] and [sub-frmRegistered_Bidders] I get
an error saying Access can't find the field "|" referred to in your
expression.
If I cahnge the the . to a ! I receive a run-time error 2465, Access can't
find the field 'sub-frmRegistered_Bidders' referred to in your expression.
I dont understand your other suggestions a or b and the form and sub form
are not bound to the same table. The sub form is bound to a query and the
form is bound to a table.
What I am doing wrong? Can you help me?
Mike
"Allen Browne" <Al*********@SeeSig.invalidwrote in message
news:45***********************@per-qv1-newsreader-01.iinet.net.au...
Subforms are not open in their own right, so they are not part of the
Forms collection.
You need:
Forms![NameOfYourMainFormHere].[sub-frmRegistered_Bidders].Form.Requery
Explanation:
Referring to Controls on a Subform
at: http://allenbrowne.com/casu-04.html
Other suggestions
=============
a) If the above doesn't work, the Name of the subform control could be
different than the name of the form loaded into it (its Source Object.)
b) You may find it easier to save the form with:
RunCommand acCmdSaveRecord
or even:
If Me.Dirty Then Me.Dirty = False
c) If you have a main form and subform both bound to the same table, and
the table has an AutoNumber primary key, watch out for this bug:
Fixing AutoNumbers when Access assigns negatives or duplicates
at: http://allenbrowne.com/ser-40.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Reply to group, rather than allenbrowne at mvps dot org.
"SBC News Groups" <me@you.netwrote in message
news:7G*******************@newssvr21.news.prodigy. com...
>>I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form "sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information is stored?
If the subform has a module, or has the HasModule property set to true
then
Form_sub-frmRegistered_Bidder.Requery
should do the trick.
On Nov 14, 11:26 pm, "SBC News Groups" <m...@you.netwrote:
I have a form that the user enters some information on and then clicks a
button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because
the newly saved information should now display on the sub form. I am trying
to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form
"sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information
is stored?
Thanks,
Mike
The Has Module property is set to No.
Any other ideas?
Mike
"Lyle Fairfield" <ly***********@aim.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
If the subform has a module, or has the HasModule property set to true
then
Form_sub-frmRegistered_Bidder.Requery
should do the trick.
On Nov 14, 11:26 pm, "SBC News Groups" <m...@you.netwrote:
>I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form "sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information is stored?
Thanks,
Mike
Open the main form in design view.
Right-click the edge of the subform control, and choose Properties.
What is the Name property of the subform control?
(It's the first item on the Other tab of the Properties box.)
The Name of the subform control may not be sub-frmRegistered_Bidders, even
if that is the name of the form that gets loaded into the control.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"SBC News Groups" <me@you.netwrote in message
news:rr****************@newssvr14.news.prodigy.com ...
Thansk for the replay Allen, but I still can not get it to work. I
modified my line to the following:
Forms![frmBidders].[sub-frmRegistered_Bidders].Form.Requery
With a period between the [frmBidders] and [sub-frmRegistered_Bidders] I
get an error saying Access can't find the field "|" referred to in your
expression.
If I cahnge the the . to a ! I receive a run-time error 2465, Access can't
find the field 'sub-frmRegistered_Bidders' referred to in your expression.
I dont understand your other suggestions a or b and the form and sub form
are not bound to the same table. The sub form is bound to a query and the
form is bound to a table.
What I am doing wrong? Can you help me?
Mike
"Allen Browne" <Al*********@SeeSig.invalidwrote in message
news:45***********************@per-qv1-newsreader-01.iinet.net.au...
>Subforms are not open in their own right, so they are not part of the Forms collection.
You need:
Forms![NameOfYourMainFormHere].[sub-frmRegistered_Bidders].Form.Requery
Explanation: Referring to Controls on a Subform at: http://allenbrowne.com/casu-04.html
Other suggestions ============= a) If the above doesn't work, the Name of the subform control could be different than the name of the form loaded into it (its Source Object.)
b) You may find it easier to save the form with: RunCommand acCmdSaveRecord or even: If Me.Dirty Then Me.Dirty = False
c) If you have a main form and subform both bound to the same table, and the table has an AutoNumber primary key, watch out for this bug: Fixing AutoNumbers when Access assigns negatives or duplicates at: http://allenbrowne.com/ser-40.html
"SBC News Groups" <me@you.netwrote in message news:7G*******************@newssvr21.news.prodigy .com...
>>>I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form "sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information is stored?
On Thu, 16 Nov 2006 03:46:25 GMT, "SBC News Groups" <me@you.netwrote:
Set it to Yes.
>The Has Module property is set to No.
Any other ideas?
Mike
"Lyle Fairfield" <ly***********@aim.comwrote in message news:11*********************@h48g2000cwc.googlegr oups.com...
>If the subform has a module, or has the HasModule property set to true then
Form_sub-frmRegistered_Bidder.Requery
should do the trick.
On Nov 14, 11:26 pm, "SBC News Groups" <m...@you.netwrote:
>>I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form "sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information is stored?
Thanks,
Mike
Wayne Gillespie
Gosford NSW Australia
Thanks a bunch!!
The name was actually qryRegistered_Bidders not sub-frmRegistered_Bidders.
It works now.
Mike
"Allen Browne" <Al*********@SeeSig.invalidwrote in message
news:45***********************@per-qv1-newsreader-01.iinet.net.au...
Open the main form in design view.
Right-click the edge of the subform control, and choose Properties.
What is the Name property of the subform control?
(It's the first item on the Other tab of the Properties box.)
The Name of the subform control may not be sub-frmRegistered_Bidders, even
if that is the name of the form that gets loaded into the control.
--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"SBC News Groups" <me@you.netwrote in message
news:rr****************@newssvr14.news.prodigy.com ...
>Thansk for the replay Allen, but I still can not get it to work. I modified my line to the following:
Forms![frmBidders].[sub-frmRegistered_Bidders].Form.Requery
With a period between the [frmBidders] and [sub-frmRegistered_Bidders] I get an error saying Access can't find the field "|" referred to in your expression.
If I cahnge the the . to a ! I receive a run-time error 2465, Access can't find the field 'sub-frmRegistered_Bidders' referred to in your expression.
I dont understand your other suggestions a or b and the form and sub form are not bound to the same table. The sub form is bound to a query and the form is bound to a table.
What I am doing wrong? Can you help me?
Mike
"Allen Browne" <Al*********@SeeSig.invalidwrote in message news:45***********************@per-qv1-newsreader-01.iinet.net.au...
>>Subforms are not open in their own right, so they are not part of the Forms collection.
You need:
Forms![NameOfYourMainFormHere].[sub-frmRegistered_Bidders].Form.Requery
Explanation: Referring to Controls on a Subform at: http://allenbrowne.com/casu-04.html
Other suggestions ============= a) If the above doesn't work, the Name of the subform control could be different than the name of the form loaded into it (its Source Object.)
b) You may find it easier to save the form with: RunCommand acCmdSaveRecord or even: If Me.Dirty Then Me.Dirty = False
c) If you have a main form and subform both bound to the same table, and the table has an AutoNumber primary key, watch out for this bug: Fixing AutoNumbers when Access assigns negatives or duplicates at: http://allenbrowne.com/ser-40.html
"SBC News Groups" <me@you.netwrote in message news:7G*******************@newssvr21.news.prodig y.com... I have a form that the user enters some information on and then clicks a button to save the record. I do with the following line:
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Once this line executes, I have a sub form that I want to "refresh" because the newly saved information should now display on the sub form. I am trying to do this with this line:
Forms![sub-frmRegistered_Bidders].Requery
Nut I get and error message telling me that Access can not find the form "sub-frmRegistered_Bidders".
So my question is this, how do I refresh the sub form after the information is stored?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Dave Boyd |
last post by:
Hi,
I have two very similar forms each with a subform. The main form gets
a few fields from the user and passes this back to a query that the
subform is bound to. The requery is done when the...
|
by: F. Michael Miller |
last post by:
I need to requery a subform from a third form and can't seem to get it to
work.
frmForm1 has frmAddress as a subform. The button cmdReviseAddress opens the
form frmUpdateAddress where all of my...
|
by: ken |
last post by:
Hi,
I have a main form with a text box and a filter button. I also have a
subform in the main form. When I make an entry into the filter text box
and click the filter button, I change the query...
|
by: BartonConstruction |
last post by:
Greetings all,
I have a main form (frmClients) with two subforms (subVisits)
(subAccount). I got the subforms to reflect what the main form is
showing by linking master and child fields (I...
|
by: Kurt |
last post by:
I have an unbound main form with an unbound subform.
frmProjects
fsubProjectList
Using combo boxes, the user can select several search criteria on
frmProjects and then click a command button....
|
by: Parasyke |
last post by:
I have a subform within a tabpage that will requery/refresh (?) if I
press F9 and it will update the data in the subform, but I have tried
various combinations of Me!SubformName.requery...
|
by: midlothian |
last post by:
Hello,
I have conditional formatting set up on a subform based on a calculated
value in the underlying query. For instance, if Sales are >$1000, the
query displays "Yes," otherwise it displays...
|
by: MarkoBBC |
last post by:
Hi everyone,
First a brief description of my form: I have a subform within a main form. In my subform, I have a listbox displaying address information by firm name. A user first has to select a...
|
by: mrowe |
last post by:
I am using Access 2003. (I am also using ADO in the vast majority of my code. I recently read a post that indicated that ADO is not all that is was initially cracked up to be. In the back of my...
|
by: mslagle1 |
last post by:
Hi all,
I am trying to requery a subform "frmOpenWorkOrders" when a value list "status" on my main form "frmWorkOrderMain" is changed. If I change "status" then click on "frmOpenWorkOrders" and...
|
by: MeoLessi9 |
last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |