If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#21
|
|||
|
|||
sorry you have mean really confused now.
do you mean just every other letter as it still doesn't make sense like that??? I may find that the first part is ksnell@ but cant seem to understand the last part?! i know im stupid - LOL Sorry. "Ken Snell [MVP]" wrote in message ... That email address is "munged" -- which means I've modified it from its real address by adding extraneous characters. You can decipher the real email address from it by removing the words this is not real from it... begin at the left side of the address, find the first t, remove it, then continue to find the h, remove it, etc. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... so what is your email: etl Sorry i don't understand remove the words - what words? Thanks. Neil M "Ken Snell [MVP]" wrote in message ... Zip up the database (less than 2 MB as zip file) and email to me with clear instructions on which forms and controls are involved in the question. You can extract my email address by removing the words this is not real from my reply-to email address. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Now i'm getting the message: Run-time error 2465 Can't find the field 'Subform/Subreport: Sub' referred top in your expression. Is there anyway I can send to you privately please so we can sort this out I would really appreciate it. Thanks, Neil "Ken Snell [MVP]" wrote in message ... That is not what I posted: Private Sub Form_Close() Forms!MAIN![Subform/Subreport: Sub].Requery End Sub -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... I've already tried that: Forms!MAIN!Sub.Requery and it still shows the same error? "Ken Snell [MVP]" wrote in message ... OK, so the name of the subform control is "Subform/Subreport: Sub"? Then the code would change to this: Private Sub Form_Close() Forms!MAIN![Subform/Subreport: Sub].Requery End Sub We don't need to include any reference to the tab page itself, as the form "owns" the controls on the tab page as well. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Access 2002 (10.6501.6735) SP3 "Ken Snell [MVP]" wrote in message ... Which version of ACCESS are you using? -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... The name states Subform/Subreport: Sub (Summary is the page name (for the selected tab - on the multitab page) Would it be easier for me to send you the database file, then you can tell me where i'm going wrong and i can explain to the group to help others with the possible same problem. Thanks. Neil "Ken Snell [MVP]" wrote in message ... The error suggests that you're not using the correct name of the main form or the correct name of the subform control that is on that main form. I don't know what you mean by "the tab is Summary"? What was the name in the Name property in the Other tab when you opened the Properties window after clicking on the top of the subform while the main form is in design view? -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Thanks. Think i'm getting to grips with this now. Although now the problem shows up as ; "The Expression you entered refers to an object that is closed or does not exist" I have checked the name of the form and the tab is Summary and the Sub form has a name SUB, which i changed the requery to reflect either, but still the same error? (Forms!MAIN!Sub.Requery or Summary.Requery) Any idea's. I really do appreciate this help. It's getting me further to understand what is going wrong rather than just telling me the answer... Thanks. Neil M "Ken Snell [MVP]" wrote in message ... Are you sure that the subform control (the subform control is the control on the main form -- that control holds the subform object) is named Summary? The name of this control may not be the same name as the form that is the subform object. Open the form in design view, click on the top edge of the subform, open Properties window, and see what the name is on the Other tab. Also, as I understand your setup, you're entering data in the popup form that you then want to be shown in the subform, right? Let's try this code in these events for the popup form. Let's use the Click event of the button (SAVE and EXIT button that you put on the form) to do this code (saves the record and closes the form): Private Sub YourButtonsName_Click() Me.Dirty = False DoCmd.Close acForm, Me.Name, acSaveNo End Sub Then let's use the Close event of the popup form to run this code (requeries the main form's subform, if the names are correct): Private Sub Form_Close() Forms!MAIN!Summary.Requery End Sub The DoEvents statement is a way to tell ACCESS to "pause" and let things catch up. It returns control to the PC so that it can do other things, then ACCESS regains control and continues. It's a common way to let things finish before the code continues. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... What is the DoEvents command? Also, just to let you know the subform still is not updating???? Any other idea's? Regards, Neil "Ken Snell [MVP]" wrote in message ... Do the requery before you close. DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoEvents Forms!MAIN!Summary.Requery DoCmd.Close -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Actually got it exiting the form now, but my next problem is that the list is still not updating in Summary.. I close the pop-up form using a SAVE AND EXIT command button with this code; DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoCmd.Close Forms!MAIN!Summary.Requery But the new record is still not being shown on the summary list unless i update (using a combo box to list OPEN or CLOSED) Any further help would be appreciated and I do appreciate all the help thus far Thanks. Neil "Neil M" wrote in message ... Thanks. But now i'm getting this error: Run-time error 438 Object doesn't support this property or method My code is this; Private Sub Form_Close() [Forms]![Main]![Summary]![Sub].Requery End Sub Any further help would be appreciative Thanks. Neil "Ken Snell [MVP]" wrote in message ... Use the Close event of the popup form to run this code step: Forms!MAIN!SUMMARY.Requery This assumes that the name of the subform control (the control on MAIN that is actually holding the subform object) is named SUMMARY. -- Ken Snell MS ACCESS MVP "Neil" wrote in message ... Hi all, Ive asked this question before a different way but got no resolution. So here's my problem again, please advise on alternative workarounds or a solution; How do requery a subform on another form from a seperate form? I have a MAIN form that display a datasheet subform named SUMMARY I click ADD on the main form and it brings up a new window to add (or edit) the record. but when the new window closes the subform doesn't update with the new information. How do i update this subform after closing the NEWREC form, so the summary subform updates with any new records just added or edited. (the summary holds user id and a few other bits of info) Clicking on the record id on the subform opens the record details, which works correctly at the moment. Any extra help would be great - i want to try and finish this database and this is the only thing stopping me at the moment. Thanks, Neil |
#22
|
|||
|
|||
Neil,
If you go back to your original issue of the requery not posting your new record. I believe it's because the new record has not been posted at the time you're doing the requery. The steps needed a Add the new record - you're doing this Post the record - doesn't sound like this is getting done before you perform your requery. Requery the previous subform When you're in the new record... it's not getting posted, therefore, your requery is probably working but only sees records that are posted to the table (normal). You can Freeze the current form, move to next record, requery the subform and then close the current form. (there are more efficient ways but this should get you in the ballpark where you want to be and it sounds like you could easily handle this) Neil wrote: Hi all, Ive asked this question before a different way but got no resolution. So here's my problem again, please advise on alternative workarounds or a solution; How do requery a subform on another form from a seperate form? I have a MAIN form that display a datasheet subform named SUMMARY I click ADD on the main form and it brings up a new window to add (or edit) the record. but when the new window closes the subform doesn't update with the new information. How do i update this subform after closing the NEWREC form, so the summary subform updates with any new records just added or edited. (the summary holds user id and a few other bits of info) Clicking on the record id on the subform opens the record details, which works correctly at the moment. Any extra help would be great - i want to try and finish this database and this is the only thing stopping me at the moment. Thanks, Neil -- Message posted via http://www.accessmonster.com |
#23
|
|||
|
|||
I'm sorry, but I will not post the full address here in the ng.....
I don't know any other way to explain it than what I've done... try it on paper by crossing out characters and see which characters remain. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... sorry you have mean really confused now. do you mean just every other letter as it still doesn't make sense like that??? I may find that the first part is ksnell@ but cant seem to understand the last part?! i know im stupid - LOL Sorry. "Ken Snell [MVP]" wrote in message ... That email address is "munged" -- which means I've modified it from its real address by adding extraneous characters. You can decipher the real email address from it by removing the words this is not real from it... begin at the left side of the address, find the first t, remove it, then continue to find the h, remove it, etc. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... so what is your email: etl Sorry i don't understand remove the words - what words? Thanks. Neil M "Ken Snell [MVP]" wrote in message ... Zip up the database (less than 2 MB as zip file) and email to me with clear instructions on which forms and controls are involved in the question. You can extract my email address by removing the words this is not real from my reply-to email address. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Now i'm getting the message: Run-time error 2465 Can't find the field 'Subform/Subreport: Sub' referred top in your expression. Is there anyway I can send to you privately please so we can sort this out I would really appreciate it. Thanks, Neil "Ken Snell [MVP]" wrote in message ... That is not what I posted: Private Sub Form_Close() Forms!MAIN![Subform/Subreport: Sub].Requery End Sub -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... I've already tried that: Forms!MAIN!Sub.Requery and it still shows the same error? "Ken Snell [MVP]" wrote in message ... OK, so the name of the subform control is "Subform/Subreport: Sub"? Then the code would change to this: Private Sub Form_Close() Forms!MAIN![Subform/Subreport: Sub].Requery End Sub We don't need to include any reference to the tab page itself, as the form "owns" the controls on the tab page as well. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Access 2002 (10.6501.6735) SP3 "Ken Snell [MVP]" wrote in message ... Which version of ACCESS are you using? -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... The name states Subform/Subreport: Sub (Summary is the page name (for the selected tab - on the multitab page) Would it be easier for me to send you the database file, then you can tell me where i'm going wrong and i can explain to the group to help others with the possible same problem. Thanks. Neil "Ken Snell [MVP]" wrote in message ... The error suggests that you're not using the correct name of the main form or the correct name of the subform control that is on that main form. I don't know what you mean by "the tab is Summary"? What was the name in the Name property in the Other tab when you opened the Properties window after clicking on the top of the subform while the main form is in design view? -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Thanks. Think i'm getting to grips with this now. Although now the problem shows up as ; "The Expression you entered refers to an object that is closed or does not exist" I have checked the name of the form and the tab is Summary and the Sub form has a name SUB, which i changed the requery to reflect either, but still the same error? (Forms!MAIN!Sub.Requery or Summary.Requery) Any idea's. I really do appreciate this help. It's getting me further to understand what is going wrong rather than just telling me the answer... Thanks. Neil M "Ken Snell [MVP]" wrote in message ... Are you sure that the subform control (the subform control is the control on the main form -- that control holds the subform object) is named Summary? The name of this control may not be the same name as the form that is the subform object. Open the form in design view, click on the top edge of the subform, open Properties window, and see what the name is on the Other tab. Also, as I understand your setup, you're entering data in the popup form that you then want to be shown in the subform, right? Let's try this code in these events for the popup form. Let's use the Click event of the button (SAVE and EXIT button that you put on the form) to do this code (saves the record and closes the form): Private Sub YourButtonsName_Click() Me.Dirty = False DoCmd.Close acForm, Me.Name, acSaveNo End Sub Then let's use the Close event of the popup form to run this code (requeries the main form's subform, if the names are correct): Private Sub Form_Close() Forms!MAIN!Summary.Requery End Sub The DoEvents statement is a way to tell ACCESS to "pause" and let things catch up. It returns control to the PC so that it can do other things, then ACCESS regains control and continues. It's a common way to let things finish before the code continues. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... What is the DoEvents command? Also, just to let you know the subform still is not updating???? Any other idea's? Regards, Neil "Ken Snell [MVP]" wrote in message ... Do the requery before you close. DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoEvents Forms!MAIN!Summary.Requery DoCmd.Close -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Actually got it exiting the form now, but my next problem is that the list is still not updating in Summary.. I close the pop-up form using a SAVE AND EXIT command button with this code; DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoCmd.Close Forms!MAIN!Summary.Requery But the new record is still not being shown on the summary list unless i update (using a combo box to list OPEN or CLOSED) Any further help would be appreciated and I do appreciate all the help thus far Thanks. Neil "Neil M" wrote in message ... Thanks. But now i'm getting this error: Run-time error 438 Object doesn't support this property or method My code is this; Private Sub Form_Close() [Forms]![Main]![Summary]![Sub].Requery End Sub Any further help would be appreciative Thanks. Neil "Ken Snell [MVP]" wrote in message ... Use the Close event of the popup form to run this code step: Forms!MAIN!SUMMARY.Requery This assumes that the name of the subform control (the control on MAIN that is actually holding the subform object) is named SUMMARY. -- Ken Snell MS ACCESS MVP "Neil" wrote in message ... Hi all, Ive asked this question before a different way but got no resolution. So here's my problem again, please advise on alternative workarounds or a solution; How do requery a subform on another form from a seperate form? I have a MAIN form that display a datasheet subform named SUMMARY I click ADD on the main form and it brings up a new window to add (or edit) the record. but when the new window closes the subform doesn't update with the new information. How do i update this subform after closing the NEWREC form, so the summary subform updates with any new records just added or edited. (the summary holds user id and a few other bits of info) Clicking on the record id on the subform opens the record details, which works correctly at the moment. Any extra help would be great - i want to try and finish this database and this is the only thing stopping me at the moment. Thanks, Neil |
#25
|
|||
|
|||
Eric,
could you explain in code how to; You can Freeze the current form, move to next record, requery the subform and then close the current form. Thanks, Neil "Eric D via AccessMonster.com" wrote in message ... Neil, If you go back to your original issue of the requery not posting your new record. I believe it's because the new record has not been posted at the time you're doing the requery. The steps needed a Add the new record - you're doing this Post the record - doesn't sound like this is getting done before you perform your requery. Requery the previous subform When you're in the new record... it's not getting posted, therefore, your requery is probably working but only sees records that are posted to the table (normal). You can Freeze the current form, move to next record, requery the subform and then close the current form. (there are more efficient ways but this should get you in the ballpark where you want to be and it sounds like you could easily handle this) Neil wrote: Hi all, Ive asked this question before a different way but got no resolution. So here's my problem again, please advise on alternative workarounds or a solution; How do requery a subform on another form from a seperate form? I have a MAIN form that display a datasheet subform named SUMMARY I click ADD on the main form and it brings up a new window to add (or edit) the record. but when the new window closes the subform doesn't update with the new information. How do i update this subform after closing the NEWREC form, so the summary subform updates with any new records just added or edited. (the summary holds user id and a few other bits of info) Clicking on the record id on the subform opens the record details, which works correctly at the moment. Any extra help would be great - i want to try and finish this database and this is the only thing stopping me at the moment. Thanks, Neil -- Message posted via http://www.accessmonster.com |
#26
|
|||
|
|||
Think i have temp. solved this problem.
On the close of the popup form I just tried to add Close MAIN then OPEN Main and now the new info gets inserted into the form. Although if anyone can help me with 1-on-1 stuff I would be appreciative. I will then add the help to the group so that others in the same boat can get the problems fixed. I would like to email the database to a person so they can tell me where I am going wrong, as I have some other small problems that need fixing also. Thanks, Neil M P.S.: My email address is; "Ken Snell [MVP]" wrote in message ... Are you sure that the subform control (the subform control is the control on the main form -- that control holds the subform object) is named Summary? The name of this control may not be the same name as the form that is the subform object. Open the form in design view, click on the top edge of the subform, open Properties window, and see what the name is on the Other tab. Also, as I understand your setup, you're entering data in the popup form that you then want to be shown in the subform, right? Let's try this code in these events for the popup form. Let's use the Click event of the button (SAVE and EXIT button that you put on the form) to do this code (saves the record and closes the form): Private Sub YourButtonsName_Click() Me.Dirty = False DoCmd.Close acForm, Me.Name, acSaveNo End Sub Then let's use the Close event of the popup form to run this code (requeries the main form's subform, if the names are correct): Private Sub Form_Close() Forms!MAIN!Summary.Requery End Sub The DoEvents statement is a way to tell ACCESS to "pause" and let things catch up. It returns control to the PC so that it can do other things, then ACCESS regains control and continues. It's a common way to let things finish before the code continues. -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... What is the DoEvents command? Also, just to let you know the subform still is not updating???? Any other idea's? Regards, Neil "Ken Snell [MVP]" wrote in message ... Do the requery before you close. DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoEvents Forms!MAIN!Summary.Requery DoCmd.Close -- Ken Snell MS ACCESS MVP "Neil M" wrote in message ... Actually got it exiting the form now, but my next problem is that the list is still not updating in Summary.. I close the pop-up form using a SAVE AND EXIT command button with this code; DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 DoCmd.Close Forms!MAIN!Summary.Requery But the new record is still not being shown on the summary list unless i update (using a combo box to list OPEN or CLOSED) Any further help would be appreciated and I do appreciate all the help thus far Thanks. Neil "Neil M" wrote in message ... Thanks. But now i'm getting this error: Run-time error 438 Object doesn't support this property or method My code is this; Private Sub Form_Close() [Forms]![Main]![Summary]![Sub].Requery End Sub Any further help would be appreciative Thanks. Neil "Ken Snell [MVP]" wrote in message ... Use the Close event of the popup form to run this code step: Forms!MAIN!SUMMARY.Requery This assumes that the name of the subform control (the control on MAIN that is actually holding the subform object) is named SUMMARY. -- Ken Snell MS ACCESS MVP "Neil" wrote in message ... Hi all, Ive asked this question before a different way but got no resolution. So here's my problem again, please advise on alternative workarounds or a solution; How do requery a subform on another form from a seperate form? I have a MAIN form that display a datasheet subform named SUMMARY I click ADD on the main form and it brings up a new window to add (or edit) the record. but when the new window closes the subform doesn't update with the new information. How do i update this subform after closing the NEWREC form, so the summary subform updates with any new records just added or edited. (the summary holds user id and a few other bits of info) Clicking on the record id on the subform opens the record details, which works correctly at the moment. Any extra help would be great - i want to try and finish this database and this is the only thing stopping me at the moment. Thanks, Neil |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Form, Subform, Tab key | 2nd_Stage_User | Using Forms | 17 | August 25th, 2006 12:30 AM |
open subform in new window or as form | PCC Ken | Using Forms | 0 | August 1st, 2005 09:59 PM |
strategy for data entry in multiple tables | LAF | Using Forms | 18 | April 25th, 2005 04:04 AM |
subform's field and corresponding recordset out of sync? | AB | General Discussion | 3 | November 8th, 2004 10:54 PM |
dlookup | miaplacidus | Using Forms | 9 | August 5th, 2004 09:16 PM |