I have a form with a subform, and a child linked form.
The main form is a data entry point for different business tracking. The child form that is opened from that is used to enter product information, that when closed, refreshes the main form, so that the product information appears in the subform area. (Basically populating a list)
Right now on the "close/update" button of the child form, I have code that prompts the main form to refresh. (Forms![frmName].Requery)...the problem is, I don't know how to get it to refresh the data, but to stay on the selected record. The refresh resets the record to 1, and then I have to scroll back through to my selected record.
Ideas?
4 2118
I have a form with a subform, and a child linked form.
The main form is a data entry point for different business tracking. The child form that is opened from that is used to enter product information, that when closed, refreshes the main form, so that the product information appears in the subform area. (Basically populating a list)
Right now on the "close/update" button of the child form, I have code that prompts the main form to refresh. (Forms![frmName].Requery)...the problem is, I don't know how to get it to refresh the data, but to stay on the selected record. The refresh resets the record to 1, and then I have to scroll back through to my selected record.
Ideas?
-
Dim varBookmark As Variant 'will hold Current Bookmark
-
-
'Store the original Bookmark in a Variant
-
varBookmark = Me.Bookmark
-
-
'Requery the Form
-
Me.Requery
-
-
'Restore the original Bookmark
-
Me.Bookmark = varBookmark
-
Seems to solve my problem. Thank you.
Seems to solve my problem. Thank you.
You are very welcome.
Frustrating. This was working a couple of weeks back, but when I revisit the database now, it's saying that it's "not a valid bookmark". -
'Close the form I just entered the data into
-
DoCmd.Close acForm, "frmMPR_Price_Subform"
-
-
Dim varBookmark As Variant
-
-
'Store the original Bookmark of the sheet I want to requery to show the updated form
-
varBookmark = Forms!frmMPR.Bookmark
-
-
'Requery the Form
-
Forms!frmMPR.Requery
-
-
'Restore the original Bookmark
-
Forms!frmMPR.Bookmark = varBookmark
-
Then it errors out. Form resets to record 1.
Any help?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Philo Del Middleston |
last post by:
I've been searching, but apparently not phrasing my search right, so I'm
going to float a question out here in the meantime...
I'm wondering how to go about refreshing the content of a control...
|
by: Neil |
last post by:
I have a very puzzling situation with a database. It's an Access 2000 mdb
with a SQL 7 back end, with forms bound using ODBC linked tables. At our
remote location (accessed via a T1 line) the time...
|
by: msnews |
last post by:
Hi --
I'm very, very new to ASP.Net, and I've been trying for several days to
figure out how to update a datagrid AND refresh it on the client side so
that the page doesn't refresh. I've torn my...
|
by: William Wisnieski |
last post by:
Hello Everyone,
Access 2000
I have a main form with a continuous subform. On the main form I have a
text field called . It gets populated based on what the user
selects in a field on the...
|
by: dmartin_1 |
last post by:
I'm building an application with Visual Basic 2005. The application is
multi threaded. It has a record counter on the form that counts up to
completion. It works fine throughout the process as...
|
by: Iain |
last post by:
I am attempting to create an "easy input (from the pov of the user)" form.
A main form displays one page per record with a sub form displaying a list of records related to the main record. The...
|
by: chimambo |
last post by:
Hi all,
I have a problem with maintaining data without refreshing manually in
my system. I have a system which carries data across several pages.
But if a user wants to go back to the previous...
|
by: magmike |
last post by:
I have a contact form that once the contact information is filled out,
a button is pressed by the user to pull up another form that schedules
a call back date and time for that record. If you hit...
|
by: shankari07 |
last post by:
hi guys,
I have a form in html which has the city drop down. when clicking the drop down a javascript is called and a file(test.txt) is created and the city is written into the file.
Through php...
|
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: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |