473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Serial Number in Data Reports

I am using data reports of Visual Basic 6.0, can any body tell me that how I can print serial number vertically on the data reports like 1,2,3,4,5,6,7,8,9,..................... please reply.
Jul 10 '07 #1
44 6072
hariharanmca
1,977 1GB
I am using data reports of Visual Basic 6.0, can any body tell me that how I can print serial number vertically on the data reports like 1,2,3,4,5,6,7,8,9,..................... please reply.


there may be special fields in that select record count this will print SLNO...
Jul 10 '07 #2
Killer42
8,435 Expert 8TB
When you say "vertically" do you mean that you want the number shown with each digit below the previous? I mean like serial number 12345 being printed as
1
2
3
4
5
???
Jul 10 '07 #3
Yes I want this result...
1
2
3
4
5

I have tried my best.... but the problem still not solved.. I am using data reports in VB 6.0 via data environment. I am using SQL Builder(In dataenvironment) which gives me the true result. but when I try for Serial Number for reports. It is creating problem, either the serial number does not print in actual way or it miss in betweent the records....

I am preparing a Equipment Tracking Information System for my organization.
There is so many Electronic Equpiment place at various Locations as well as in Head Office. I have different tables which are joined with each other(using relational database) in MS Access. I am applying the following query to extract the records to print on report.

SELECT EQUIPMENT_MSTR.EQUIPMENT_ID, CATEGORY_MSTR.EQUIPMENT_CATEGORY, SUB_CATEGORY_MSTR.EQUIPMENT_SUBCATEGORY, BRAND_MSTR.BRAND_NAME, EQUIPMENT_MSTR.MODEL, EQUIPMENT_MSTR.QUANTITY, LOCATION_MSTR.LOCATION, EQUIPMENT_MSTR.DESCRIPTION, EQUIPMENT_MSTR.DATE_OF_COMMISSIONING (SELECT COUNT(*) FROM EQUIPMENT_MSTR AS SNO WHERE SNO.equipment_id >= EQUIPMENT_MSTR.equipment_id) AS SLNO FROM LOCATION_MSTR, EQUIPMENT_MSTR, CATEGORY_MSTR, SUB_CATEGORY_MSTR, BRAND_MSTR WHERE LOCATION_MSTR.LOCATION_ID = " & mLocId & " and LOCATION_MSTR.LOCATION_ID = EQUIPMENT_MSTR.LOCATION_ID AND EQUIPMENT_MSTR.DOMAIN_ID = CATEGORY_MSTR.DOMAIN_ID AND EQUIPMENT_MSTR.SUB_CATEGORY_ID = SUB_CATEGORY_MSTR.sub_category_id AND EQUIPMENT_MSTR.BRAND_ID = BRAND_MSTR.BRAND_ID ORDER BY EQUIPMENT_MSTR.EQUIPMENT_ID DESC

if you consider this query you will find a sub query, this sub query count the records from a table and place serial number.

but if you again look at this query I am making this query more filtered, that I want thoes records that the equipment is placed at specific location and I wrote this query after WHERE clause LOCATION_MSTR.LOCATION_ID = " & mLocId & "

this query fetch the records from a EQUIPMENT_MSTR and gives some specific records but their serial numbers vary.. i.e. 1,2,3,4,......23, and 67,68,69,70......85, and 112,113,114,115,,116.....etc.

Now I want this serial number in one sequance i.e. 1,2,3,4,5....23,24,25....67,68,............116.

I hope you understand my problem.
Jul 11 '07 #4
hariharanmca
1,977 1GB
Yes I want this result...
1
2
3
4
5

I have tried my best.... but the problem still not solved.. I am using data reports in VB 6.0 via data environment. I am using SQL Builder(In dataenvironment) which gives me the true result. but when I try for Serial Number for reports. It is creating problem, either the serial number does not print in actual way or it miss in betweent the records....

I am preparing a Equipment Tracking Information System for my organization.
There is so many Electronic Equpiment place at various Locations as well as in Head Office. I have different tables which are joined with each other(using relational database) in MS Access. I am applying the following query to extract the records to print on report.

SELECT EQUIPMENT_MSTR.EQUIPMENT_ID, CATEGORY_MSTR.EQUIPMENT_CATEGORY, SUB_CATEGORY_MSTR.EQUIPMENT_SUBCATEGORY, BRAND_MSTR.BRAND_NAME, EQUIPMENT_MSTR.MODEL, EQUIPMENT_MSTR.QUANTITY, LOCATION_MSTR.LOCATION, EQUIPMENT_MSTR.DESCRIPTION, EQUIPMENT_MSTR.DATE_OF_COMMISSIONING (SELECT COUNT(*) FROM EQUIPMENT_MSTR AS SNO WHERE SNO.equipment_id >= EQUIPMENT_MSTR.equipment_id) AS SLNO FROM LOCATION_MSTR, EQUIPMENT_MSTR, CATEGORY_MSTR, SUB_CATEGORY_MSTR, BRAND_MSTR WHERE LOCATION_MSTR.LOCATION_ID = " & mLocId & " and LOCATION_MSTR.LOCATION_ID = EQUIPMENT_MSTR.LOCATION_ID AND EQUIPMENT_MSTR.DOMAIN_ID = CATEGORY_MSTR.DOMAIN_ID AND EQUIPMENT_MSTR.SUB_CATEGORY_ID = SUB_CATEGORY_MSTR.sub_category_id AND EQUIPMENT_MSTR.BRAND_ID = BRAND_MSTR.BRAND_ID ORDER BY EQUIPMENT_MSTR.EQUIPMENT_ID DESC

if you consider this query you will find a sub query, this sub query count the records from a table and place serial number.

but if you again look at this query I am making this query more filtered, that I want thoes records that the equipment is placed at specific location and I wrote this query after WHERE clause LOCATION_MSTR.LOCATION_ID = " & mLocId & "

this query fetch the records from a EQUIPMENT_MSTR and gives some specific records but their serial numbers vary.. i.e. 1,2,3,4,......23, and 67,68,69,70......85, and 112,113,114,115,,116.....etc.

Now I want this serial number in one sequance i.e. 1,2,3,4,5....23,24,25....67,68,............116.

I hope you understand my problem.
I never used data report. but the procedure will be same for all reports

select that record count and place it in the detail section where u need.
Jul 11 '07 #5
I am counting record in my sub query... but it does not fulfill my requirement. please again read the query.
Jul 11 '07 #6
hariharanmca
1,977 1GB
I am counting record in my sub query... but it does not fulfill my requirement. please again read the query.

can u explan the diff between

Expand|Select|Wrap|Line Numbers
  1.  i.e. 1,2,3,4,......23, and 67,68,69,70......85, and 112,113,114,115,,116.....etc.
  2.  
  3. Now I want this serial number in one sequance i.e. 1,2,3,4,5....23,24,25....67,68,............116.
because i'm not finding any diff btwn this. Give with few numbers don't keep dot
Jul 11 '07 #7
ok, suppose we have 20 records in a table and my query selects 6 records and these records are placed at various rows. my query shows the result like this with serial number.

Sl # Manufac EqptName Installed Location

3. SONY CAMERA Islamabad
4. SONY VCR Islamabad
5. Panasonic Camera Islamabad
9. Hitachi Still Camea Islamabad
13. Olympus Tripod Islamabad
14. JVC VCR Islamabad

If you note the above query you will find that a foreing key is being called "Islamabad" and the Serial Number is not being represented in sequance.
because the records are placed at various rows and the count number shows the corresponding serial reference as serial number.

The query is ok, but the serial number should be. 1,2,3,4,5,6 instead of 3,4,5,9,13,14.
Jul 12 '07 #8
Killer42
8,435 Expert 8TB
Correct me if I'm wrong, but it sounds to me as though you don't want the serial number at all, but instead want a simple record sequence number. That is, "1" for the first record, "2" for the second and so on, regardless of where they came from.

This number would have no relationship to the contents of the record - is that right?
Jul 12 '07 #9
hariharanmca
1,977 1GB
Correct me if I'm wrong, but it sounds to me as though you don't want the serial number at all, but instead want a simple record sequence number. That is, "1" for the first record, "2" for the second and so on, regardless of where they came from.

This number would have no relationship to the contents of the record - is that right?

Yha, the Qry
Expand|Select|Wrap|Line Numbers
  1. (SELECT COUNT(*) FROM EQUIPMENT_MSTR AS SNO WHERE SNO.equipment_id >= EQUIPMENT_MSTR.equipment_id)
it is not good Practice to print SLNO using QRY and it won't
Jul 12 '07 #10
Yes Mr.Killer you are right.. If my query select 89 records I want serial number from 1 to 89 and if my query selects 568 records I want serial number from 1 to 568.

please send me the code.
Jul 13 '07 #11
hariharanmca
1,977 1GB
Yes Mr.Killer you are right.. If my query select 89 records I want serial number from 1 to 89 and if my query selects 568 records I want serial number from 1 to 568.

please send me the code.

you can get serial number in report itself then it doesn’t make any sense to write a qry for that
Jul 13 '07 #12
Killer42
8,435 Expert 8TB
you can get serial number in report itself then it doesn’t make any sense to write a qry for that
I don't know how to do it, but I think it's perfectly reasonable to want a sequence number. I think, though, that referring to it as a serial number is just confusing everybody.

This is probably a question for the Access forum. In fact, I think I remember the question having been raised there in the past. Can't remember the answer, though.
Jul 13 '07 #13
hariharanmca
1,977 1GB
I don't know how to do it, but I think it's perfectly reasonable to want a sequence number. I think, though, that referring to it as a serial number is just confusing everybody.

This is probably a question for the Access forum. In fact, I think I remember the question having been raised there in the past. Can't remember the answer, though.
We can display a slno in the design itself then why should we waste process time for generating SLNO and display it
I never mind, can any one use such qry.
Jul 13 '07 #14
Killer42
8,435 Expert 8TB
I don't know the specific reason why it's required in this case. But there's a big difference between sequentially numbering the results in a query (you could call it a "line" or "row" number I suppose) and just showing a number from the records. Imagine if the row numbers in Excel changed depending on the order of the data - disaster!

I've asked a couple of Access gurus for help, but they're not online at the moment.
Jul 13 '07 #15
hariharanmca
1,977 1GB
I don't know the specific reason why it's required in this case. But there's a big difference between sequentially numbering the results in a query (you could call it a "line" or "row" number I suppose) and just showing a number from the records. Imagine if the row numbers in Excel changed depending on the order of the data - disaster!

I've asked a couple of Access gurus for help, but they're not online at the moment.

I didn’t try for that qry. Okay, lets wait for some one expert in Qry will reply

As i told, i am in MAYA (MEL). No VB or any database operator in my system

So cannot Try it.
Jul 13 '07 #16
NeoPa
32,556 Expert Mod 16PB
In Access (read any RDBMS) there is no defined relationship between records in a table.
As such, this requirement is not something supplied by the main Access engine. Like many similar questions, there are often ways to produce what you want, or something similar, by using code. Before even thinking about that though, you must decide what order you want the records to be numbered in. Consider a transaction table (holding sales orders for various customers of various products). Would they be numbered to reflect the Customer order primarily, or the Product order?
When you have determined this and it is clear, you have two options (that I can think of) :
  1. Process the whole of the table in code (DAO or ADODB). Within the loop update the field you have selected to hold the sequence number, with the next number in sequence.
  2. Easier, create a publicly defined function with a Static variable to hold the sequence number and set the sequence field to this function within a relevantly sorted update query.
These are both snapshot situations. As soon as a record is added or deleted (or any of the sequence keys changed - Customer or Product in our example) this sequence will be non-representative.
Jul 13 '07 #17
Killer42
8,435 Expert 8TB
Ahah!

Thanks for that, NeoPa. Apart from the obvious difficulty in working out how/when to reset it, the static variable sounds pretty close to the sort of thing I was thinking about. I must have a bit of a play with that.

I have no idea, though, whether it's what the OP is looking for. We'll have to wait and see.
Jul 13 '07 #18
hariharanmca
1,977 1GB
In Access (read any RDBMS) there is no defined relationship between records in a table.
As such, this requirement is not something supplied by the main Access engine. Like many similar questions, there are often ways to produce what you want, or something similar, by using code. Before even thinking about that though, you must decide what order you want the records to be numbered in. Consider a transaction table (holding sales orders for various customers of various products). Would they be numbered to reflect the Customer order primarily, or the Product order?
When you have determined this and it is clear, you have two options (that I can think of) :
  1. Process the whole of the table in code (DAO or ADODB). Within the loop update the field you have selected to hold the sequence number, with the next number in sequence.
  2. Easier, create a publicly defined function with a Static variable to hold the sequence number and set the sequence field to this function within a relevantly sorted update query.
These are both snapshot situations. As soon as a record is added or deleted (or any of the sequence keys changed - Customer or Product in our example) this sequence will be non-representative.

Okay, if you will try for a SLNO wat will be the Qry
Jul 13 '07 #19
Okay, if you will try for a SLNO wat will be the Qry
I was new here but I have done a way for your problem. It was also my problem a month ago. I think my code was so complicated to explain, that's why I want to send you the whole project file I created. So tell me where and how to send it.
Jul 13 '07 #20
hariharanmca
1,977 1GB
I was new here but I have done a way for your problem. It was also my problem a month ago. I think my code was so complicated to explain, that's why I want to send you the whole project file I created. So tell me where and how to send it.

no just post the QRy only. why you are going for a project
Jul 13 '07 #21
NeoPa
32,556 Expert Mod 16PB
I was new here but I have done a way for your problem. It was also my problem a month ago. I think my code was so complicated to explain, that's why I want to send you the whole project file I created. So tell me where and how to send it.
I'm afraid we don't do that here Diablo.
We need the answer to be accessible to anyone who looks at the question.
We also encourage our members not to post or give out their e-mail addresses as a general rule, as a security measure.
We appreciate your willingness to help, but please try to do it in such a way that the site rules are respected (and yes we do understand that you had no intention of breaking any rules).

MODERATOR.
Jul 13 '07 #22
NeoPa
32,556 Expert Mod 16PB
Okay, if you will try for a SLNO wat will be the Qry
Hari,
Please try to express your requirement in clear English without using abbreviations or 'text speak'. Otherwise it's difficult to understand what you want.
Jul 13 '07 #23
hariharanmca
1,977 1GB
Hari,
Please try to express your requirement in clear English without using abbreviations or 'text speak'. Otherwise it's difficult to understand what you want.



Okay, if you will try to display Serial Numbers, what will be query approximately?


(I will try my best to avoid using abbreviations or 'text speak')
Jul 13 '07 #24
NeoPa
32,556 Expert Mod 16PB
For a query, the latter method would need to be used (refer to post #23).
The function would need to be defined in a general module as :
Expand|Select|Wrap|Line Numbers
  1. Public Function SerNo(Optional blnReset As Boolean = False) As Long
  2.   Static lngSerNo as Long
  3.  
  4.   If blnReset Then
  5.     lngSerNo = 0
  6.   Else
  7.     lngSerNo = lngSerNo + 1
  8.   End If
  9.   SerNo = lngSerNo
  10. End Function
  11.  
Before running the query, you should call the function with the Reset option like :
Expand|Select|Wrap|Line Numbers
  1. Call SerNo(True)
Jul 13 '07 #25
NeoPa
32,556 Expert Mod 16PB
I don't have any information as to your table structure or which query you are running, but in general the query would be something like :
Expand|Select|Wrap|Line Numbers
  1. SELECT SerNo(), *
  2. FROM [YourTable]
  3. ORDER BY [OrderField1], [OrderField2]
Jul 13 '07 #26
hariharanmca
1,977 1GB
I don't have any information as to your table structure or which query you are running, but in general the query would be something like :
Expand|Select|Wrap|Line Numbers
  1. SELECT SerNo(), *
  2. FROM [YourTable]
  3. ORDER BY [OrderField1], [OrderField2]

if SerNo() is a method in SQL(Let me allow this abbreviation..lol) query?
Jul 13 '07 #27
NeoPa
32,556 Expert Mod 16PB
LOL Hari, yes SQL is an accepted abbreviation (especially in the Access areas).
Is SerNo() a SQL method? No. See post #25 for the explanation and definition of SerNo().
Jul 13 '07 #28
hariharanmca
1,977 1GB
LOL Hari, yes SQL is an accepted abbreviation (especially in the Access areas).
Is SerNo() a SQL method? No. See post #25 for the explanation and definition of SerNo().

Is there any way to write a singe query for generating a serial number?

(Without any front-end methods)
Jul 13 '07 #29
NeoPa
32,556 Expert Mod 16PB
For this question you need to read post #17. The answer's no but it's explained more fully there.
Jul 13 '07 #30
hariharanmca
1,977 1GB
For this question you need to read post #17. The answer's no but it's explained more fully there.
okay, I done it.........

I taught, there may be some way to get it with Query...
Jul 14 '07 #31
As you wrote a Function, but the funcation can't be called in the SELECT query... in my case see the code

like this.. and it is creating error.. but how I would print it on the Data Report ?????

If cmbBrand.Text = "" Then
MsgBox "Please Select Manufacturer Name ! ", vbExclamation, "Select Manufacturer Name"
cmbBrand.SetFocus
Exit Sub
Else

End If

If DataEnvironment1.rsCommand6.State = 1 Then
DataEnvironment1.rsCommand6.Close

DataEnvironment1.rsCommand6.Open " SELECT SerNo(), CATEGORY_MSTR.EQUIPMENT_CATEGORY, SUB_CATEGORY_MSTR.EQUIPMENT_SUBCATEGORY, EQUIPMENT_MSTR.MODEL, EQUIPMENT_MSTR.QUANTITY, EQUIPMENT_MSTR.DATE_OF_COMMISSIONING, BRAND_MSTR.BRAND_NAME FROM BRAND_MSTR, EQUIPMENT_MSTR, SUB_CATEGORY_MSTR, CATEGORY_MSTR WHERE equipment_MSTR.brand_ID = " & mBrandID & " and BRAND_MSTR.BRAND_ID = EQUIPMENT_MSTR.BRAND_ID AND EQUIPMENT_MSTR.SUB_CATEGORY_ID = SUB_CATEGORY_MSTR.sub_category_id AND EQUIPMENT_MSTR.DOMAIN_ID = CATEGORY_MSTR.DOMAIN_ID ORDER BY CATEGORY_MSTR.EQUIPMENT_CATEGORY"
rptAllEqptSpecificMan.Show
Else

DataEnvironment1.rsCommand6.Open " SerNo(), SELECT CATEGORY_MSTR.EQUIPMENT_CATEGORY, SUB_CATEGORY_MSTR.EQUIPMENT_SUBCATEGORY, EQUIPMENT_MSTR.MODEL, EQUIPMENT_MSTR.QUANTITY, EQUIPMENT_MSTR.DATE_OF_COMMISSIONING, BRAND_MSTR.BRAND_NAME FROM BRAND_MSTR, EQUIPMENT_MSTR, SUB_CATEGORY_MSTR, CATEGORY_MSTR WHERE equipment_MSTR.brand_ID = " & mBrandID & " and BRAND_MSTR.BRAND_ID = EQUIPMENT_MSTR.BRAND_ID AND EQUIPMENT_MSTR.SUB_CATEGORY_ID = SUB_CATEGORY_MSTR.sub_category_id AND EQUIPMENT_MSTR.DOMAIN_ID = CATEGORY_MSTR.DOMAIN_ID ORDER BY CATEGORY_MSTR.EQUIPMENT_CATEGORY"
rptAllEqptSpecificMan.Show

End If
Jul 14 '07 #32
this problem is not solving, as the Serial Number printing on data report is a very common nature dillema, and programmers solve it only in Crystal Reports, but I dont know ABC of CR , anyhow..

please keep putting ur posts until the problem solves.
Jul 14 '07 #33
hariharanmca
1,977 1GB
this problem is not solving, as the Serial Number printing on data report is a very common nature dillema, and programmers solve it only in Crystal Reports, but I dont know ABC of CR , anyhow..

please keep putting ur posts until the problem solves.

Actually, that is not possible.

we don't know what you are? and where you are? So it is difficult to solve....

you can do it. just keep on... trying and post your question..

Good luck
Jul 14 '07 #34
pureenhanoi
175 100+
I am using data reports of Visual Basic 6.0, can any body tell me that how I can print serial number vertically on the data reports like 1,2,3,4,5,6,7,8,9,..................... please reply.
There is many replies for u above. But i want show u onother comon way to solve this problem.
It is easy if u use one Temporary table. Imazine, u select all of data that u need and insert it into one temporary table. The data report will need show method only, and it load all data from temporary table (instead of the main table).
Example: u have table called A_Table and a datareport called DataReport1. The DataReport1 reference to A_Table to view data. Now, u want display some of this data from A_Table with serial number for the first column. U must create a table called A_Table_Temp. A_Table_Temp have the same structure with A_Table except a addition column called Serial (have datatype of Number)
Now, try the code like this
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdShowReport_Click()
  2. Dim i as Long
  3. 'Delete current data in A_Temp_Table 
  4. sql = "DELETE * FROM A_Tem_Table"
  5. Con.Excute sql
  6. 'select the data that u need
  7. sql = "SELECT * FROM A_Table WHERE "   ' add ur conditions for this statement
  8. Set rs = Con.Excute(sql)
  9. i=1
  10. While Not rs.Eof
  11.       'insert row for temporary table with serial column
  12.       sql = "INSERT INTO A_Temp_Table (Serial,...) VALUES(" & i &"," & rs.Fields(1) & "," & rs.Fields(2) & "," & rs.Fields(3)
  13.       Con.Excute sql
  14.       rs.MoveNext
  15. Wend
  16. 'now, show ur Report with data load from A_Temp_Table
  17. Report1.ShowReport
  18. End Sub
  19.  
1. Remember, ur data report must load data from A_Tem_Table instead of A_Table
2. Ur data report donot need another filter, it load all data from temporary table
3. Remember, add Serial colume from A_Temp_Table into ur report
4. Ur program will work abit slow if the u need a large amount of data to display
5. If u have a better method, pls show me...
good luck
Jul 14 '07 #35
danp129
323 Expert 256MB
Dunno how it can be done with access with a single query. I also don't have any experience with data reports other than spending 5 minutes just now looking at the sample prjNwind.vbp file. I don't even know if it's similar to the topic at hand :)

If there's any way you can execute a few queries before trying to pull the data, you could select your recordset into a new table (call it temp or something), remove (or alter to a long) any auto-increment field that got copied over to the new table, then add a new auto increment column. It's a nasty solution either way.


Here's an example of doing what I'm talking about to the northwind db. It puts record number in sequential order after being ordered a specified way (by productname):

Expand|Select|Wrap|Line Numbers
  1. 'Add reference to MS ActiveX Data Objects Library
  2. 'Add ListBox
  3. 'Add Command button
  4. 'Add nwind.mdb to folder this project is saved in
  5.  
  6. Private Sub Command1_Click()
  7.     List1.Clear
  8.     Dim rs As ADODB.Recordset
  9.     Dim cn As ADODB.Connection
  10.     Dim x As Integer
  11.     Dim strSql As String
  12.     Dim strCon As String
  13.  
  14.     'Database Connection
  15.     Set cn = New ADODB.Connection
  16.  
  17.     strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\nwind.mdb;"
  18.     cn.Open strCon
  19.  
  20.     Set rs = New ADODB.Recordset
  21.  
  22.  
  23.     strSql = "SELECT * into temp from products order by productname"
  24.     cn.Execute (strSql)
  25.  
  26.     cn.Execute ("ALTER TABLE temp ALTER COLUMN productid long;")
  27.  
  28.     'This will add an auto increment field numbered in the order it was input above (by product name)
  29.     cn.Execute ("ALTER TABLE temp ADD COLUMN myid int IDENTITY(1,1);")
  30.  
  31.  
  32.     strSql = "SELECT * FROM temp order by myid"
  33.     rs.Open strSql, cn, 1, 1
  34.  
  35.     While Not rs.EOF
  36.         List1.AddItem rs.Fields("myid") & "-" & rs.Fields("ProductName")
  37.         rs.MoveNext
  38.     Wend
  39.     rs.Close
  40.  
  41.     strSql = "drop table temp"
  42.     cn.Execute (strSql)
  43.  
  44.     cn.Close
  45.     Set cn = Nothing
  46.     Set rs = Nothing
  47.  
  48. End Sub
  49.  
Jul 14 '07 #36
NeoPa
32,556 Expert Mod 16PB
okay, I done it.........

I thouht, there may be some way to get it with a Query...
Everybody seems to think that. I don't know why :confused: It's seems so obvious to me that it doesn't make any sense in terms of an RDBMS.
How the data is produced is an internal process of the RDBMS and, as such, is by definition undefined. It produces the results, it doesn't guarantee to do it using any particular method. How can it provide something relative to other records when you don't even know which order that Access will process the records in?

That's why calling the function to return a sequential number isn't guaranteed to work properly. It generally does however, as Access typically does process the records in the order that you would anticipate.
Jul 14 '07 #37
Please refer Post # 35. I was using this method to create a temp table and inserting the data from different tables., this method is very heavy and not a logical, which is know as brudeforce concept,.. being a professional programmer I dont understand that my this method will be helpful for a bulky database., however, I/we must use the professional approach to resolve the critical nature problem.Therefore, inserting of SERIAL NUMBER on data report is not a very big task as some one told that it is impossible, and I understand that nothing is impossible in this world.

Anyhow, as I put my code in the very first reply, if u people check it, you will see that a serial number field is being created by the code, but the major problem is, it is not catching the exact ordered SERIAL NUMBER.,., instead of catching 1,2,3,4,5,6,7........... it is only catching the corresponding record number as serial number i.e if there are so many records pertaining to a one query in the table it gives the corresponding record number as serial number,.. i.e

Eqpt Location Qty Model
Camera Karachi 12 sp12
Camera Karachi 10 cd25
Camera Lahore 8 cf85
VCR Karachi 3 -
VCR Lahore 4 -
VCR Quetta 6 -
Tripod Islamabad 8 -
Tripod Islamabad 9 -
Camera Quetta 6 vb67
Camera Karchi 9 gh87
Camera Karchi 12 je87
DSNG Islamabad 3 -
DSNG Peshawer 6 -

Now in the above record if I select those Cameras which are located at KARACHI
it gives the following result

Sl.No Eqpt Location Qty Model
1. Camera Karachi 12 sp12
2. Camera Karachi 10 cd25
10. Camera Karchi 9 gh87
11. Camera Karchi 12 je87

Now in the above produced result the serial number is 1,2,10,11 instead of 1,2,3,4 .... if u concentrate it, this is only giving the corresponding record number from table.

I want this result

Sl.No Eqpt Location Qty Model
1. Camera Karachi 12 sp12
2. Camera Karachi 10 cd25
3. Camera Karchi 9 gh87
4. Camera Karchi 12 je87
Jul 16 '07 #38
NeoPa
32,556 Expert Mod 16PB
Let me get this straight.
You want to tell us we are wrong, that it can be done, but you want US to tell YOU how?
That's a very interesting concept.
You ask us a question then, because you don't like the answer you tell us that it's not good enough.
This doesn't reflect too well on your intelligence or your manners.
I can only wish you good bye and good luck.

PS. If you read what has been answered already you may understand WHY we are right. It's all there if only you look.
Jul 16 '07 #39
hariharanmca
1,977 1GB
Please refer Post # 35. I was using this method to create a temp table and inserting the data from different tables., this method is very heavy and not a logical, which is know as brudeforce concept,.. being a professional programmer I dont understand that my this method will be helpful for a bulky database., however, I/we must use the professional approach to resolve the critical nature problem.Therefore, inserting of SERIAL NUMBER on data report is not a very big task as some one told that it is impossible, and I understand that nothing is impossible in this world.

Anyhow, as I put my code in the very first reply, if u people check it, you will see that a serial number field is being created by the code, but the major problem is, it is not catching the exact ordered SERIAL NUMBER.,., instead of catching 1,2,3,4,5,6,7........... it is only catching the corresponding record number as serial number i.e if there are so many records pertaining to a one query in the table it gives the corresponding record number as serial number,.. i.e

Eqpt Location Qty Model
Camera Karachi 12 sp12
Camera Karachi 10 cd25
Camera Lahore 8 cf85
VCR Karachi 3 -
VCR Lahore 4 -
VCR Quetta 6 -
Tripod Islamabad 8 -
Tripod Islamabad 9 -
Camera Quetta 6 vb67
Camera Karchi 9 gh87
Camera Karchi 12 je87
DSNG Islamabad 3 -
DSNG Peshawer 6 -

Now in the above record if I select those Cameras which are located at KARACHI
it gives the following result

Sl.No Eqpt Location Qty Model
1. Camera Karachi 12 sp12
2. Camera Karachi 10 cd25
10. Camera Karchi 9 gh87
11. Camera Karchi 12 je87

Now in the above produced result the serial number is 1,2,10,11 instead of 1,2,3,4 .... if u concentrate it, this is only giving the corresponding record number from table.

I want this result

Sl.No Eqpt Location Qty Model
1. Camera Karachi 12 sp12
2. Camera Karachi 10 cd25
3. Camera Karchi 9 gh87
4. Camera Karchi 12 je87

Its good Okay, but you have to know (as NeoPa post) that

We people are here to explain the experiments, not to experiment the explanations


thank you
Jul 16 '07 #40
Mr.NeoPa you moved my dicussion to a wrong way, no one is a big and final programmer over here(including me), replying the mail and putting some irrelevant answers plus showing rude attitude is not a useful practice, if u observe my previous post, not a single word would reflect my crucial behavior nor an unmannered talk. So gentleman If you understand that I am scattring any unmannered sort of discussion then contact to the moderator of this forum and block me at first instance.

Thanks for your nice comments about me.

Bye.
Jul 17 '07 #41
hariharanmca
1,977 1GB
Mr.NeoPa you moved my dicussion to a wrong way, no one is a big and final programmer over here(including me), replying the mail and putting some irrelevant answers plus showing rude attitude is not a useful practice, if u observe my previous post, not a single word would reflect my crucial behavior nor an unmannered talk. So gentleman If you understand that I am scattring any unmannered sort of discussion then contact to the moderator of this forum and block me at first instance.

Thanks for your nice comments about me.

Bye.
this method is very heavy and not a logical, which is know as brudeforce concept,.. being a professional programmer I dont understand that my this method will be helpful for a bulky database., however, I/we must use the professional approach to resolve the critical nature problem.Therefore, inserting of SERIAL NUMBER on data report is not a very big task as some one told that it is impossible, and I understand that nothing is impossible in this world.


and

some one told that it is impossible, and I understand that nothing is impossible in this world
These things are very hard to hear. And it means you already solved that, then why you trying to some one do this same thing. It does not make any sense.


and

So gentleman If you understand that I am scattring any unmannered sort of discussion then contact to the moderator of this forum and block me at first instance.



And no one here is quit some one. It means, just avoid hereafter…

Cool…
Jul 17 '07 #42
Mr. hariharanmca if you note these sentences deeply you would found that it was all about the discussion in generally by using professional approach, here you are only try to increase your posts to become a super member of this forum,. but dont want to resolve the problem instead.

It is obvious that people dont want to listen the true and acutal things about themselves and in general, however I didn't come here to kill someone with my words. As I told that by creating a temp table and inserting temp records is not a big task , why dont we focus to do it programatically in few lines of code?

Here I came to share my knowledge and learn from you people but all in vain.

I wouldn't like to put further comments.
Jul 17 '07 #43
hariharanmca
1,977 1GB
Mr. hariharanmca if you note these sentences deeply you would found that it was all about the discussion in generally by using professional approach, here you are only try to increase your posts to become a super member of this forum,. but dont want to resolve the problem instead.
Of course, but I’ll do it only in café/lounge or introduction forms, not in the query forms (which will irritate people in forms).

and i gave some solution but NeoPa is better than me. So I just contribute me to make things clear for me.
Jul 17 '07 #44
NeoPa
32,556 Expert Mod 16PB
Asif,

Perhaps you're right to a certain extent. It's always difficult dealing in a foreign language. I know that I struggle to understand what you are trying to say so it is very possible that I misunderstood it. I do know it's easy to insult people in another language without intending to.
That being said, you can choose whether or not to follow my advice. I have no problem if you choose not to, but don't expect me to continue working with you on this if you choose that option.

-NeoPa.
Jul 17 '07 #45

Sign in to post your reply or Sign up for a free account.

Similar topics

21
by: Gavin | last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other groups in a hope to get a response from anyone. Can any one tell me how to make my VB program read the Bios serial number...
0
by: Polerio Babao Jr.II | last post by:
file fbus3.py resource shared by Chris Liechti <cliechti@gmx.net> during the conversation last september 2002. I made it available so that other user would benefit from it. I've used with...
15
by: tom | last post by:
Hi, How do I get the serial number of the harddisk in .NET? I want this to be the same number even if the user has reformatted, so I do not want the volume serial number. Thanx, t
21
by: nephish | last post by:
i have an interesting project at work going on. here is the challenge. i am using the serial module to read data from a serial input. it comes in as a hex. i need to make it a binary and compare it...
1
by: Darren DeCoste | last post by:
I am trying to create an application in Access that I will be able to print bar code labels. A stumbling block that I have hit is the Serial Number on the bar code. I would like to be able to read...
3
by: Mark Harris | last post by:
I have an installer which uses a Customer Information page in it, is there an easy way to pass the serial number entered to a custom action? If not, where would i find the serial number in the...
2
by: joaquimfpinto | last post by:
Dear All, I made an app in c# that uses several serial ports. For the serial ports I use a pnp Sunix board, some with 8 serial ports other with 4 or even 2 serial ports. Whenever I use the...
4
by: N2Deep | last post by:
I have a table named SUPPORT DATA, I have a field named Serial Number. In the Serial Number field I have many duplicates, and I only want one of each. Sample serials ABB045000MG, JBX05050016 ...
4
by: JDS | last post by:
I have an application that interfaces with a USB device using the .Net serial port. The code works fine, displaying live data on the screen; that is until the USB lead is pulled out from the PC...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.