Open record in form using table Record Selector

G

Guest

I have a form with a table subform containing a list or invoice summaries. I
would like to be able to click on the record selector on the left of each
summary to open that invoice in full in a seperate form. The forms are all
done already so I just need to know how to recognise the record selector
being clicked.
 
A

Al Camp

Rich,
Is each subform record an individual record*, or a summary record of several Invoices?

I would not use the record selector to initiate an "open a detail form on this record"
Most often I make a key field in the record dark red BG, and that signifies to the user
that a Dbl-Click on that field will open a "detail" form.

*There should be a unique key value on each subform record that can be used to open the
new form to the exact record you want.
InvoiceNo...? You would then use the Where argument in the OpenForm method to open
just the record you want deatil on.
.... "InvoiceNo = " & [InvoiceNo]

Please give a bit more detail on your subform records, and any key fields they contain.
 
G

Guest

Hi Al,

Yes, each summary is for a single invoice record. It's a single line showing
Invoice number, client name and invoice total. I had thought of placing a
command button on the form but would still prefer the selector if it's
possible.

Al Camp said:
Rich,
Is each subform record an individual record*, or a summary record of several Invoices?

I would not use the record selector to initiate an "open a detail form on this record"
Most often I make a key field in the record dark red BG, and that signifies to the user
that a Dbl-Click on that field will open a "detail" form.

*There should be a unique key value on each subform record that can be used to open the
new form to the exact record you want.
InvoiceNo...? You would then use the Where argument in the OpenForm method to open
just the record you want deatil on.
.... "InvoiceNo = " & [InvoiceNo]

Please give a bit more detail on your subform records, and any key fields they contain.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Rich Stone said:
I have a form with a table subform containing a list or invoice summaries. I
would like to be able to click on the record selector on the left of each
summary to open that invoice in full in a seperate form. The forms are all
done already so I just need to know how to recognise the record selector
being clicked.
 
A

Al Camp

Rich,
To my knowledge, there is no event properties for the record selector button. It's a
built in Access function, so you can't hang any code on it.
Also, in design mode, the record selector is not even shown as an addressable object...

The Dbl-Click (or some other event of you're choosing) won't take up any room, and no
need for a button unless you want one for clarity for the user. Your choice... (ex. a
button with just an &D caption (Alt-D) for "Details")
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Rich Stone said:
Hi Al,

Yes, each summary is for a single invoice record. It's a single line showing
Invoice number, client name and invoice total. I had thought of placing a
command button on the form but would still prefer the selector if it's
possible.

Al Camp said:
Rich,
Is each subform record an individual record*, or a summary record of several
Invoices?

I would not use the record selector to initiate an "open a detail form on this
record"
Most often I make a key field in the record dark red BG, and that signifies to the user
that a Dbl-Click on that field will open a "detail" form.

*There should be a unique key value on each subform record that can be used to open
the
new form to the exact record you want.
InvoiceNo...? You would then use the Where argument in the OpenForm method to open
just the record you want deatil on.
.... "InvoiceNo = " & [InvoiceNo]

Please give a bit more detail on your subform records, and any key fields they
contain.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Rich Stone said:
I have a form with a table subform containing a list or invoice summaries. I
would like to be able to click on the record selector on the left of each
summary to open that invoice in full in a seperate form. The forms are all
done already so I just need to know how to recognise the record selector
being clicked.
 
G

Guest

Sorry to bother you again... I've got the link working now with a click on
the invoice number as suggested. Now I've got another question. Is there a
way that the invoices could be opened, jumping to the one selected but so
that it's still possible to browse the other invoices? In other words, remove
the filter after the correct invoice has been displayed. I've tried clearing
the filter in the invoice form but the event happens before the chosen
invoice has been displayed. Perhaps there is a way to jump to the invoice
without setting the filter?

Al Camp said:
Rich,
To my knowledge, there is no event properties for the record selector button. It's a
built in Access function, so you can't hang any code on it.
Also, in design mode, the record selector is not even shown as an addressable object...

The Dbl-Click (or some other event of you're choosing) won't take up any room, and no
need for a button unless you want one for clarity for the user. Your choice... (ex. a
button with just an &D caption (Alt-D) for "Details")
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Rich Stone said:
Hi Al,

Yes, each summary is for a single invoice record. It's a single line showing
Invoice number, client name and invoice total. I had thought of placing a
command button on the form but would still prefer the selector if it's
possible.

Al Camp said:
Rich,
Is each subform record an individual record*, or a summary record of several
Invoices?

I would not use the record selector to initiate an "open a detail form on this
record"
Most often I make a key field in the record dark red BG, and that signifies to the user
that a Dbl-Click on that field will open a "detail" form.

*There should be a unique key value on each subform record that can be used to open
the
new form to the exact record you want.
InvoiceNo...? You would then use the Where argument in the OpenForm method to open
just the record you want deatil on.
.... "InvoiceNo = " & [InvoiceNo]

Please give a bit more detail on your subform records, and any key fields they
contain.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form with a table subform containing a list or invoice summaries. I
would like to be able to click on the record selector on the left of each
summary to open that invoice in full in a seperate form. The forms are all
done already so I just need to know how to recognise the record selector
being clicked.
 
A

Al Camp

Rich,
Use the FindRecord method instead of a filter. That will send you to the corrcet
record, and still allow browsing.

Ex.
From a form called frmOrderEntry, with a CustID field, I want to open the frmCustomer
to see details about that customer.

Private Sub CustID_DblClick(Cancel As Integer)
DoCmd.OpenForm "frmCustomers"
DoCmd.GoToControl "CustID"
DoCmd.FindRecord Forms![frmOrderEntry]![CustID]
End Sub

Again, I'll mention that whenever a user of one of my apps sees a brick red background
on a field, they know that a double-click will yield the detail form behind that value.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Rich Stone said:
Sorry to bother you again... I've got the link working now with a click on
the invoice number as suggested. Now I've got another question. Is there a
way that the invoices could be opened, jumping to the one selected but so
that it's still possible to browse the other invoices? In other words, remove
the filter after the correct invoice has been displayed. I've tried clearing
the filter in the invoice form but the event happens before the chosen
invoice has been displayed. Perhaps there is a way to jump to the invoice
without setting the filter?

Al Camp said:
Rich,
To my knowledge, there is no event properties for the record selector button. It's
a
built in Access function, so you can't hang any code on it.
Also, in design mode, the record selector is not even shown as an addressable
object...

The Dbl-Click (or some other event of you're choosing) won't take up any room, and
no
need for a button unless you want one for clarity for the user. Your choice... (ex. a
button with just an &D caption (Alt-D) for "Details")
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Rich Stone said:
Hi Al,

Yes, each summary is for a single invoice record. It's a single line showing
Invoice number, client name and invoice total. I had thought of placing a
command button on the form but would still prefer the selector if it's
possible.

:

Rich,
Is each subform record an individual record*, or a summary record of several
Invoices?

I would not use the record selector to initiate an "open a detail form on this
record"
Most often I make a key field in the record dark red BG, and that signifies to the
user
that a Dbl-Click on that field will open a "detail" form.

*There should be a unique key value on each subform record that can be used to
open
the
new form to the exact record you want.
InvoiceNo...? You would then use the Where argument in the OpenForm method to
open
just the record you want deatil on.
.... "InvoiceNo = " & [InvoiceNo]

Please give a bit more detail on your subform records, and any key fields they
contain.

--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form with a table subform containing a list or invoice summaries. I
would like to be able to click on the record selector on the left of each
summary to open that invoice in full in a seperate form. The forms are all
done already so I just need to know how to recognise the record selector
being clicked.
 
G

Guest

Hello again Al,

Thanks once again for your invaluable help. It took a while for me to get
this method working, but realised that it's because the target form had the
field I was searching hidden! That's because I display the field's content in
a lookup combo box instead (a sort of quick find option). As making the field
visible would have meant showing it's contents in two fields at the same time
on the form, I moved the searched field behind another field and turned off
the tab stop so it can't be altered or selected. It's working fine!!!!

Rich.
 

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

Similar Threads


Top