473,549 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1760
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
RelatedCustomer Number - 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****@thankyo u.com" <mi*****@yahoo. comwrote in
news:11******** **************@ j4g2000prf.goog legroups.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
RelatedCustomer Number - 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.cmbCustN um = me.PrimaryKey
is the code to set the new value.

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

CALL cmbCustNum_afte rUpdate

You will need to change the

private sub cmbCustNum_afte rUpdate
to
public sub .cmbCustNum_aft erUpdate

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
1463
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 it if you could download it, kick the tires and let us know of any problems you find, but it is probably not suitable for production usage. At this...
9
1574
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 debug version but behaves strangely and sometimes crashes when I run it in release version. I suspect that it is some sort of memory problem but it...
14
1803
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 days. There is only one major change between Beta5 and RC1 that, so far, has been reported back ... RC1 will no longer work with TCL8.0.x, due to...
1
2704
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/ http://sourceforge.net/project/showfiles.php?group_id=133165 This release is based on Arnold Robbins' regular GNU Awk 3.1.5. Problem reports are supposed to go to...
0
1333
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 production use. It is being released to solicit feedback and hopefully expose bugs, as well as allowing you to determine how changes in 2.5 might...
4
2701
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 have been applied to the Python 2.5 code. In the interests of making 2.5 the best release possible, we've decided to put out a second (and hopefully...
10
8138
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 and excel is closed. But there are some commented lines: //xlSeries.XValues = xlWs.get_Range("B2", "B4"); // makes com objects, but which...
0
1498
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. The software can be downloaded from: http://www.ltg.ed.ac.uk/software/ltxml2 From the README file:
3
1824
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 built on. Now I want to build a release version so I can deploy it to Windows 2003 server. This project is compiled with "/clr:oldSystax". I've...
0
7527
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7459
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7726
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7967
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7819
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6052
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5377
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3488
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.