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!

Generating a serial number in data report using VB6

Status
Not open for further replies.

pniranjan

IS-IT--Management
Dec 11, 2008
1
Hi

I am new to VB6 , I want to generate a serial number while designing a query for data report. Sr. no field is not contained in my table. I m using front end Vb6 and back end Access. Plz help me .
 
What criteria should the serial number be generated with?

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 

>Sr. no field is not contained in my table

1. Well, IF there is more than one record, and the serial number is different for each record, then you will then probably need to use a fabricated recordset built off of a recordset which gets it's data from a db table, adding to it the serial number value for each record in the fabricated recordset. And then use this fabricated recordset for the data report.

2. If however there is only one record, or the serial number is identical for all records, or the serial number is created from other fields in the db table, the serial number could be built right into the SELECT statement.

3. Instead of a fabricated recordset you could create a tempoary table which gets filled with data from the db table and then update the temp table with the serial numbers. The report would then be based off a recordset which gets it's data from the temp table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top