search forms

  • Thread starter timbits35 via AccessMonster.com
  • Start date
T

timbits35 via AccessMonster.com

Hi,

I have created a basic search form using unbound text boxes and based on a
query. I have not used coding since I am not so familiar with it. My search
works fine, but is there a way to select one of the records from the results
of the query, click on it and then go to the resulting record in the original
form?

Thank you
Liane
 
M

mabl123456

Hi,

I have created a basic search form using unbound text boxes and based on a
query. I have not used coding since I am not so familiar with it. My search
works fine, but is there a way to select one of the records from the results
of the query, click on it and then go to the resulting record in the original
form?

Thank you
Liane

Hi
there is several ways of doing this but not without coding as far as I
know. One easy way of doing this is to put an unbound combobox on your
form. The rowsource of the combo shall be the same as the rowsource
for the form. In the afterupdate event for the combo put code like
this:
Private Sub SokUndersokning_AfterUpdate()
Me.RecordsetClone.FindFirst "[undID] = " & Me![SokUndersokning]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me!SokUndersokning = Null
End Sub

SokUndersokning is the name of the combo and undid is the primary key
for the rowsource table and also the first column in the combo.

Best wishes

Mats
 
T

timbits35 via AccessMonster.com

Hi,

Actually I don't understand this reply and how it fits in to what I have
already done.

Thanks again,
Liane


[quoted text clipped - 9 lines]
Hi
there is several ways of doing this but not without coding as far as I
know. One easy way of doing this is to put an unbound combobox on your
form. The rowsource of the combo shall be the same as the rowsource
for the form. In the afterupdate event for the combo put code like
this:
Private Sub SokUndersokning_AfterUpdate()
Me.RecordsetClone.FindFirst "[undID] = " & Me![SokUndersokning]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me!SokUndersokning = Null
End Sub

SokUndersokning is the name of the combo and undid is the primary key
for the rowsource table and also the first column in the combo.

Best wishes

Mats
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top