datasheet to form view

A

Alex

Hi

I am designing a new Management System. We have a list of customers
displayed in datasheet format. What I want to do is have user double click
on a record, and then display that records information in a form.

I assume that I need to create a new form and hide it until the user double
clicks on a record, is that right?

Also is there any sample code that I can look at to see how to select the
record and display the data?

Thanks

A
 
F

fredg

Hi

I am designing a new Management System. We have a list of customers
displayed in datasheet format. What I want to do is have user double click
on a record, and then display that records information in a form.

I assume that I need to create a new form and hide it until the user double
clicks on a record, is that right?

Also is there any sample code that I can look at to see how to select the
record and display the data?

Thanks

A

re: >customers displayed in datasheet format<
That is Form Datasheet view (not the actual Table) you are using, I
hope.

No, you do not need to create a new form.

Open your current form in design view.
Code any control's Double-click event:
DoCmd.OpenForm "FormName", , , "[RecordID] = " & [RecordID]

(Change [RecordID] to the actual name of the ID field.
The above assumes the [RecordID] is a Number datatype.)

Double click on that control while in Form Datasheet View and the form
will open in Single Form view displaying just that one record.

To return to full unfiltered Form Datasheet view, code the
double-click event of a different control:

Me.FilterOn = False
DoCmd.OpenForm "FormName", acFormDS

Double-click on this control while in single form view, and the form
will open in datasheet view, unfiltered.
 
A

Alex

Thanks

A

fredg said:
Hi

I am designing a new Management System. We have a list of customers
displayed in datasheet format. What I want to do is have user double
click
on a record, and then display that records information in a form.

I assume that I need to create a new form and hide it until the user
double
clicks on a record, is that right?

Also is there any sample code that I can look at to see how to select the
record and display the data?

Thanks

A

re: >customers displayed in datasheet format<
That is Form Datasheet view (not the actual Table) you are using, I
hope.

No, you do not need to create a new form.

Open your current form in design view.
Code any control's Double-click event:
DoCmd.OpenForm "FormName", , , "[RecordID] = " & [RecordID]

(Change [RecordID] to the actual name of the ID field.
The above assumes the [RecordID] is a Number datatype.)

Double click on that control while in Form Datasheet View and the form
will open in Single Form view displaying just that one record.

To return to full unfiltered Form Datasheet view, code the
double-click event of a different control:

Me.FilterOn = False
DoCmd.OpenForm "FormName", acFormDS

Double-click on this control while in single form view, and the form
will open in datasheet view, unfiltered.
 

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