By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,446 Members | 3,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,446 IT Pros & Developers. It's quick & easy.

PLease HElp #2 from pulling up record

P: n/a
Thank you for getting back to me. I am very new at this so i didnot
understand what you said, here i will give as much cetails as possible:

1) The combo box i am using is combox39
2) I imported a a table of parents of a school (it has name,address,#,
etc...)
3) I nead to input a ID Number (ralphs card) for some of the parents
4) The ID numbers do not go inorder of the parents, and i am not being
handed the id numbers in order
4) I want to be able to select a parent from the combobox, it will then
bring up that parent onto the form, where i could then enter the id
number.
(I use the calender to record the date that i enterd the id number)

Problem: Some of the parents, when i click on thier name it does not
bring
to their record. And also once I add the ID number, it puts thier name to
the bottom of the combobox list eventhough In the table they are still in
alphabetical order.


"Larry Linson" <bo*****@localhost.not> wrote in
news:Cq*******************@nwrddc01.gnilink.net:
Have you tried requerying the Combo Box after adding the new record?
Or, is it the Form itself you mean -- try requerying the Form, if so.

You don't have any test in your code to determine if you did or did
not find a match... use the .NoMatch property of the recordset to make
such a determination... that would be one reason that you might be
located to the first record.

And, as you know that "rs" is, in fact, a DAO.Recordset, why would you
Dim it as an Object? And, a Form's RecordsetClone is simply one
word... it is not the .Clone property of the Form's Recordset
property.

Try all these changes and if you still get relocated to the first
record, follow up with any more detail you can think of.

Larry Linson
Microsoft Access MVP
"Skully Matjas" <sk**********@yahoo.com> wrote in message
news:cc******************************@news.teranew s.com...
I am using the following code (created by the wizard) to
allow to bring my form to a particular entery. But when I
edit the entery (ex: put new information into a blank
cell), it puts that record onto the bottom of the list
(even though it keeps its record number).

Also, There are certin names that i click on the list, and
it will not bring it up, rather it brings to the first
record (no matter how many times i try going to that
record) But if I were to go to the record by typing in its
record number on the bottom, then it would work.
Here is the Code:

Option Compare Database

Private Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo22] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo31] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo33_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo33] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo39_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo39] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Thank You
.

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Skully,

I answered this as best I could in another thread. If an answer is not clear
or sufficient, you should post a followup, not a new query. I don't know if
you did or did not read my response and thus, also don't know if you did or
did not find my answer useful.

You should be able to use the Combo Box wizard to create a Combo to find a
particular record on a Form.

Secondly, if you did not get a useful answer, it is not productive to post
the identical question again -- there must have been _some_ reason that the
person gave you an answer that you couldn't use, and the very high
probablility is that it was because you didn't provide enough or clear
enough information.

Larry Linson

"Skully Matjas" <sk**********@yahoo.com> wrote in message
news:32******************************@news.teranew s.com...
Thank you for getting back to me. I am very new at this so i didnot
understand what you said, here i will give as much cetails as possible:

1) The combo box i am using is combox39
2) I imported a a table of parents of a school (it has name,address,#,
etc...)
3) I nead to input a ID Number (ralphs card) for some of the parents
4) The ID numbers do not go inorder of the parents, and i am not being
handed the id numbers in order
4) I want to be able to select a parent from the combobox, it will then
bring up that parent onto the form, where i could then enter the id
number.
(I use the calender to record the date that i enterd the id number)

Problem: Some of the parents, when i click on thier name it does not
bring
to their record. And also once I add the ID number, it puts thier name to
the bottom of the combobox list eventhough In the table they are still in
alphabetical order.


"Larry Linson" <bo*****@localhost.not> wrote in
news:Cq*******************@nwrddc01.gnilink.net:
Have you tried requerying the Combo Box after adding the new record?
Or, is it the Form itself you mean -- try requerying the Form, if so.

You don't have any test in your code to determine if you did or did
not find a match... use the .NoMatch property of the recordset to make
such a determination... that would be one reason that you might be
located to the first record.

And, as you know that "rs" is, in fact, a DAO.Recordset, why would you
Dim it as an Object? And, a Form's RecordsetClone is simply one
word... it is not the .Clone property of the Form's Recordset
property.

Try all these changes and if you still get relocated to the first
record, follow up with any more detail you can think of.

Larry Linson
Microsoft Access MVP
"Skully Matjas" <sk**********@yahoo.com> wrote in message
news:cc******************************@news.teranew s.com...
I am using the following code (created by the wizard) to
allow to bring my form to a particular entery. But when I
edit the entery (ex: put new information into a blank
cell), it puts that record onto the bottom of the list
(even though it keeps its record number).

Also, There are certin names that i click on the list, and
it will not bring it up, rather it brings to the first
record (no matter how many times i try going to that
record) But if I were to go to the record by typing in its
record number on the bottom, then it would work.
Here is the Code:

Option Compare Database

Private Sub Combo22_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo22] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo31] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo33_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo33] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo35_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Ralphs Card #] = '" & Me![Combo35] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Private Sub Combo39_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[Phone Number] = '" & Me![Combo39] & "'"
Me.Bookmark = rs.Bookmark
End Sub

Thank You
.

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.