Hi:
I have a form in my Access project called "frmWC", and a form called "frmModifyClaim". In frmWC, I set a bookmark like so: Set rst = Me.RecordsetClone rst.FindFirst "[tblWC].[fldClaimNum] = '" & Me![cmbSelectClaimNum] & "'" Me.Bookmark = rst.Bookmark
What I want to be able to do is open frmModifyClaim, and have it go to the same record that is showing on frmWC...in other words pass this bookmark on to frmModifyClaim.
How can this be accomplished?
Thank you!
Pat
5 1580
Hi:
I have a form in my Access project called "frmWC", and a form called "frmModifyClaim". In frmWC, I set a bookmark like so: Set rst = Me.RecordsetClone rst.FindFirst "[tblWC].[fldClaimNum] = '" & Me![cmbSelectClaimNum] & "'" Me.Bookmark = rst.Bookmark
What I want to be able to do is open frmModifyClaim, and have it go to the same record that is showing on frmWC...in other words pass this bookmark on to frmModifyClaim.
How can this be accomplished?
Thank you!
Pat
- Declare a Public Variable in a Standard Code Module as follows:
- Public strClaimNum As String
- Add this additional line of code:
- Set rst = Me.RecordsetClone
-
rst.FindFirst "[tblWC].[fldClaimNum] = '" & Me![cmbSelectClaimNum] & "'"
-
Me.Bookmark = rst.Bookmark
-
-
'>>>>>>>>>>>>> additional line of code here >>>>>>>>>>>>>
-
strClaimNum = Me![cmbSelectClaimNum]
- In the Open() Event of frmModifyClaim, enter the following code lines:
- 'Substitute the appropriate Field name for Claim Number
-
Me![txtClaimNumber].SetFocus
-
DoCmd.FindRecord strClaimNum
- You will advance directly to the same Claim Number in frmModifyClaim.
- Good Luck!
Hi
stDocName = "frmModifyClaim"
stLinkCriteria="fldClaimNum = '" & cmbSelectClaimNum & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
???
MTB
Hi
stDocName = "frmModifyClaim"
stLinkCriteria="fldClaimNum = '" & cmbSelectClaimNum & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
???
MTB
MTB, the only problem with this approach is that the Form will be Filtered for the specific stLinkCriteria and will only display a single Record. In the other approach, all Records for the underlying Record Source of the Form are displayed, but the Record for the specified Claim Number will now be the Current Record. This will basically mimic the Bookmark functionality.
Hi:
Thanks for your responses! I'm going to try both approaches. At first glance, I don't have a problem with MTB's method, because in frmModifyClaim I want to work with one record only...i.e. the claim that the end user wants to modify. Unless you were referring to something else?
In other words, in frmWC, a particular person can have more than one claim, and chooses which one to view by picking one from a combo box. After making the selection and populating the form with that claim's data, the user can click on a hyperlink "Modify this claim" to pop up frmModifyClaim and change the information for that claim.
Again, I will try both approaches. I was upgraded to Office 2007 today, so there are a few other more pressing issues to deal with right now :-)
Thanks!
Pat
Hi
Hi:
Thanks for your responses! I'm going to try both approaches. At first glance, I don't have a problem with MTB's method, because in frmModifyClaim I want to work with one record only...i.e. the claim that the end user wants to modify. Unless you were referring to something else?
In other words, in frmWC, a particular person can have more than one claim, and chooses which one to view by picking one from a combo box. After making the selection and populating the form with that claim's data, the user can click on a hyperlink "Modify this claim" to pop up frmModifyClaim and change the information for that claim.
Again, I will try both approaches. I was upgraded to Office 2007 today, so there are a few other more pressing issues to deal with right now :-)
Thanks!
Pat
Yes from your origianal post I thought that was the case.
If you do not want to filter the form opened, but jut got to the specific record as ADezil was proposing then I now use this technique
DoCmd.OpenForm "frmEmployeeDetails"
Form_frmEmployeeDetails.Recordset.FindFirst "ID = " & [ID]
BTW, to answer your initial question, a bookmark is only valid for the specific recordset/form, if you requery or reopen a recorset/form the bookmarks all change because they are generated at that time. Therefore you cannot pass bookmarks between modules/forms or anything else.
MTB
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Antoni |
last post by:
Hello,
I wondered if anyone could offer some guidance over my php script. I
was hoping the example would allow the user to click the submit
buttons and the item number increment.
And when the...
|
by: Chris |
last post by:
I'm trying to come up with a not-so-ugly manner of passing many
command-line options between modules.
I have a Steering.py file, which contains my main() and handles the
getopts getting of...
|
by: Thomas Anderson |
last post by:
I automatically generate several PDF a night from a DB I manage. Below
is a snippet of code that just tweakes the registry settings to store
path and filename then prints the PDF. Typically a...
|
by: Lee |
last post by:
Hi All
How can I pass options from one webpage into another webpage. When the user
clicks on the hyperlink I want them to be go to the next page but I need to
pass in a number that the next...
|
by: Mark Hayworth |
last post by:
In VB6, you could set bookmarks that were in different
files/module/classes/documents. When you clicked the flag tool to go
to the next bookmark, it would take you there, regardless if that...
|
by: andreas |
last post by:
With a vb.net application (vb.net 2003) , I want to make a new word doc
where I put several bookmarks and also text in paragraphs following the
bookmarks
How to do?
Thanks for any response
|
by: Francach |
last post by:
Hi,
I'm trying to use the Beautiful Soup package to parse through the
"bookmarks.html" file which Firefox exports all your bookmarks into.
I've been struggling with the documentation trying to...
|
by: Alan T |
last post by:
I have two bookmarks,
eg. beginMark and endMark
I need to get the text between these 2 bookmarks, how do I do that?
eg.
<beginMark>
Hello Word!
This is Saturday.
|
by: james |
last post by:
Hi guys,
I create a delegate and pass in a local variable. When the variable
is a reference type everything works fine, but when it is a valuetype
the delegate uses the value of the last...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |