473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Release Value of Find First?

--------------------------------------------------------------------------------

I have a subform with the related IDs for each customer on the
customer main form.

I have a button on the continuous subform, which will make the main
customer record go to that sub related record's customer record.
(follow me?)

Problem is that once I am at the related record, if I push the button
again, it won't go back to the master record. Once you go to a
customer's related record, the related subform shows the master record
as related. This way, you can get back to it. When I stop the code,
it has the value still equaling the related ID, and isn't releasing
that value.

Do you know how I release the value in this code?
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdGoToRelated_Click()
  2. With Me.Parent.RecordsetClone
  3. .FindFirst "ID=" & Me!RelatedMID
  4. If .NoMatch Then
  5. MsgBox "Funny - I should be able to find that person but I
  6. can't"
  7. Else
  8. Me.Parent.Bookmark = .Bookmark
  9. End If
  10.  
  11. DoCmd.Requery tblRelated_subform
  12.  
  13. Me.Parent.cmbCustomer.SetFocus
  14.  
  15. End With
  16.  
  17. End Sub
  18.  

Thanks for any help!

Aug 16 '07 #1
2 1753
Since I haven't gotten any responses, I will try to re-explain the
situation:

I have this cross reference table.

It has the following:

CID cross reference PK
CustomerNumber - the customer's number
RelatedCustomerNumber - the numbers related to that customer number
RelatedID - the Customer PK for the related number (so that you can
find them on the entry form)

So, on the main customer entry form, there is a combo box, where you
can type or scroll and select a customer number.

I now also have a related subform, to show related records.

This button should let you choose a related record to go to. The
customer combo cmbCustNum, has a row source query of the Customer PK
and CustomerNumber. It shows the CustomerNumber, but is tied to the
Customer PK.

I need that combo button to take me to a related record on the main
form. Once I am there, I need to be able to go to any related record
(including back to the one I came from) that exist on the sub related
form for that customer.

Make sense?

Thank you for any help that you can give.

Aug 17 '07 #2
"no****@thankyou.com" <mi*****@yahoo.comwrote in
news:11**********************@j4g2000prf.googlegro ups.com:
Since I haven't gotten any responses, I will try to re-explain
the situation:

I have this cross reference table.

It has the following:

CID cross reference PK
CustomerNumber - the customer's number
RelatedCustomerNumber - the numbers related to that customer
number RelatedID - the Customer PK for the related number (so
that you can find them on the entry form)

So, on the main customer entry form, there is a combo box,
where you can type or scroll and select a customer number.

I now also have a related subform, to show related records.

This button should let you choose a related record to go to.
The customer combo cmbCustNum, has a row source query of the
Customer PK and CustomerNumber. It shows the CustomerNumber,
but is tied to the Customer PK.

I need that combo button to take me to a related record on the
main form. Once I am there, I need to be able to go to any
related record (including back to the one I came from) that
exist on the sub related form for that customer.

Make sense?
No. There is no such control as a combobutton. there are
comboboxes and there are commandbuttons.

I think what you want to do is click on a button in the subform
and have the mainform move to the selected record. Is that
right?

If yes, and the combobox currently correctly lets you choose the
desired record, all you need is for the onclick event of the
subform, set the new value of the combobox.

Parent.cmbCustNum = me.PrimaryKey
is the code to set the new value.

You may also need to trigger the combo box afterUpdateEvent
after setting the new value.

CALL cmbCustNum_afterUpdate

You will need to change the

private sub cmbCustNum_afterUpdate
to
public sub .cmbCustNum_afterUpdate

in the parent form to make it accessible to the subform.
Thank you for any help that you can give.
I Hope I've helped.

--
Bob Quintal

PA is y I've altered my email address.

--
Posted via a free Usenet account from http://www.teranews.com

Aug 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the first release candidate of Python 2.4. Python 2.4c1 is a release candidate - we'd greatly appreciate...
9
by: babak | last post by:
Hi everybody I'm working with a project in embedded Visual Studio 4 and I have a general problem which I hope that somebody can help me with. My problem is the following: My project works fine in...
14
by: Marc G. Fournier | last post by:
After a relatively short period for beta5, where nothing major arose, we have just packaged up our first Release Candidate for v7.4, with the hopes of producing a full release over the next 7 to 14...
1
by: Jürgen Kahrs | last post by:
Hello, The beta alpha release (xgawk-3.1.5-beta.20060401) of the xmlgawk project is now available at SourceForge. http://sourceforge.net/projects/xmlgawk/...
0
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the first RELEASE CANDIDATE of Python 2.5. This is not yet the final release - it is not suitable for...
4
by: Anthony Baxter | last post by:
On behalf of the Python development team and the Python community, I'm happy to announce the second RELEASE CANDIDATE of Python 2.5. After the first release candidate a number of new bugfixes...
10
by: Hendri Adriaens | last post by:
Hi, I'm trying to automate the creation of an excel file via COM. I copied my code below. I read many articles about how to release the COM objects that I create. The code below runs just fine...
0
by: Richard Tobin | last post by:
I'm pleased to announce the first release of LTXML2, the new version of LTG's XML toolkit. This release is binary-only, for Mac and Linux. We intend to do a source release later in the year. ...
3
by: Russ | last post by:
I have a Web Service that was originally created with .NET VC 2003, and subsequently converted to the 2005 version. It works fine when built as a debug version, and run on the workstation it was...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
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...
0
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...
0
tracyyun
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...
0
agi2029
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.