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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset Issue..

Status
Not open for further replies.

Snappy2873

Programmer
Mar 29, 2002
54
US
Hello Everyone,
First of all,
I have a tracking_no table and a tracking_no form that displays all the records from this table. This table is populated with new data dependent upon each records stage in the record life cycle. For example, a form is filled out and a new id is generated at the click, once there is an id, there is an "account" and all new account information is stored in this tracking_no table. In the "onformat" event in the form properties, this code basically sets the recordset to the most recent id created as to set the stage for the next id.

Code:
Private Sub Form_Load()
DoCmd.GoToRecord , , acFirst
End Sub

So at the click of the "generate invoice" button, i call the tracking number form in a "control" cmd statement, this form will then populate a report called "new invoice". Here lies the problem, when generating a new id and then report i get an error when processing the new id's in succession. To avoid this error i have to generate an id and then get out then get back in. Am i missing a refresh statement? Any ideas would be greatly appreciated!!

Thanks,
snappy
 
snappy,
It would help to see what you're doing now in order to tell you what to change. Are you using DAO or ADO, etc... Kyle [pipe]
 
Hello kyleS,
In this situation there are no "data access" controls used because of the "data source" browse in the properties. The data source property is very simple in that you can throw a table, string or query into the field. After the data source is defined, I just associate the fields to the text boxes. The objects built into Access, Excel etc. make the functionality of the forms easy to build. I have never used an "ADODC" or "DAO" control with VBA, although they are available. My data source tends to be centralized to the DB that i'm building forms off of, so i havent had a need to use another data source yet. I hope my situation is a little more clear. Thanks for the analysis and have a great day.
snappy
 
Hello kyleS,
My source is contrived from "DAO" methodology, please excuse my ignorance.
snappy
 
"i get an error when processing the new id's in succession. ", so when you create 2 id's in a row, you have to get out and then get back in...

and your table is linked directly to your form right?

The only thing off the top of my head would be to go into the form properties and check the property called "Recordset Type", make sure it's set to "Dynaset" Kyle [pipe]
 
Hello kyleS,
my table is linked directly to the form and the form is pulled in as a data source for the report. The reason for this is to directly link the fields in the table to the fields in the report as well as make functionality a little more faster. It is set to "dynaset", I now believe i have an Access DB that has reached it's peak as far as efficient functionality because the record count is growing too rapidly and the processing speed has slowed down dramatically. Thanks for your help.
snappy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top