Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Continuous Forms with ADO or DAO

Status
Not open for further replies.

Tubas

Technical User
May 18, 2001
3
PT
For single forms i can apply code with recordset (ADO or DAO). What can i do it with continuous forms.
The purpose is to select all records and one by one analyse them and select or delete records.

I am having some serious problems with this. Any can help me.

 
Are you doing something with the recordset before displaying on a form. You should be able to bring the records back to a form and then manipulate as necessary unless you need to preprocess the records. In either case, explain in more detail what you need to accomplish.

What version of Access and what is the backend database?
 
Are you doing something with the recordset before displaying on a form. You should be able to bring the records back to a form and then manipulate as necessary unless you need to preprocess the records. In either case, explain in more detail what you need to accomplish.

What version of Access and what is the backend database

I'am not doing anything before displaying the form. The objective is to display records in continuous forms and then select yes or no to generate an action.
The problem is that i can't display more than one record.

The version i use is Access 2000.
 
You can change a form between continuous or single view by going to the format tab under properties for the form. The only thing that would restrict the display to one record is that the query is not bringing back more than one record. Maybe you are not showing the navigation buttons which are also under the format tab.
 
Those properties are ok.

The code i am using is the following

Private Sub Form_Open(Cancel As Integer)
Dim rs As dao.Recordset
Set rs = CurrentDb.OpenRecordset("Datas Valor Análise", dbOpenDynaset)
Set rs = CurrentDb.OpenRecordset("select * from [Datas Valor Análise]", dbOpenDynaset)

Forms![Menu Análise]![Balcão Movimento] = rs![Balcão Movimento]

rs.Close

End Sub

 
The form already has a recordset object and the easiest way is to just equate the select to the forms record source. There are other ways but it doesn't look like you need anything different.

me.recordsource = "select * from [Datas Valor Análise]"

This could also be a variable that resolves to the select statement.

dim sql as string
sql = "select * from [Datas Valor Análise]"
me.recordsource = sql
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top