Jan 9 2011, 10:07 AM
I have a loaded form "frmAlarm" that is unfiltered (It is a new record that I save before the next ->) On frmAlarm the user selects a command button and it pops up "frmAccount" that is not related to frmAlarm. When I close frmAccount frmAlarm goes to the first record in the table. This is what I want: When the user closes frmAccount it displays the same record in frmAlarm that was displayed before losing focus to frmAccount.
YI When the record in frmAlarm is not new (Filtered) it works fine. Thanks John
Jan 9 2011, 10:49 AM
Can you post an example db of problem you're encountering. I'm pretty sure I can sort this out for you, but i'll need see your setup for opening and closing the form.
Jan 9 2011, 10:56 AM
I think I jusy need code to select a record on the form when I close another form. Really don't want to upload because I have data in the tables and I'm hoping to get a answer or find the answer in a short amount of time. Any other help out there? Thanks John
Jan 9 2011, 11:16 AM
Ok, this is causing the change of record: OnClose Forms!frmalarm.Requery
When I take it out it stays on the same record. Do I need to add "me" in there to stay on the same record?
Jan 9 2011, 11:18 AM
How are you opening the frmAccount? macro or VBA? How are you closing the frmAccount? macro or VBA? In either case, please provide the full code on the buttons for the method you are using.
Edit: n/m answered while I was typing.
Jan 9 2011, 11:21 AM
What is the purpose of the requery as you stated the forms are not related?
If the information from frmAccount's table has no impact on frmAlarm's table, I'm not seeing why you really need to requery.
Jan 9 2011, 11:30 AM
When frmAccount opens it show all of the account activity for the current frmAlarm. frmaccount uses a listbox (query) based off of the pk in frmAlarm. From frmAccount the user can add a new activity that could change the balance field on frmalarm. I'm just trying to show the updated account balance field on frmAlarm.
Jan 9 2011, 11:44 AM
See this link
Hope that helps.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here