473,508 Members | 2,074 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to get same item row from different item in one time in vb and ms access

1 New Member
Expand|Select|Wrap|Line Numbers
  1. If KeyAscii = 13 Then
  2. 'Dim bal As Integer
  3.  Dim rsdis As New ADODB.Recordset
  4. rsdis.Open " select  *  from tbls where empno='" & txtemp1.Text & "' and qtyc>0 order by matno,qtyc asc ", con, adOpenKeyset, adLockOptimistic
  5. 'rsdis.Open " select time1,shift,empno,empname,distinctrow matno,matname,qtyi,qtyino,qtyiname,qtyc,remarks from tbls where empno='" & txtemp1.Text & "' and qtyc>0    ", con, adOpenKeyset, adLockPessimistic
  6.  
  7. If rsdis.RecordCount > 0 Then
  8.  
  9. With flxs
  10.    .Rows = 2
  11.    For i = 1 To rsdis.RecordCount
  12.    .TextMatrix(i, 0) = rsdis("empname")
  13.    .TextMatrix(i, 1) = rsdis("matno")
  14.    .TextMatrix(i, 2) = rsdis("matname")
  15.    .TextMatrix(i, 3) = rsdis("time1")
  16.    .TextMatrix(i, 4) = rsdis("shift")
  17.    .TextMatrix(i, 5) = rsdis("qtyi")
  18.    .TextMatrix(i, 6) = rsdis("qtyino")
  19.    .TextMatrix(i, 7) = rsdis("qtyiname")
  20.    '   .TextMatrix(i, 8) = qtyconsumed
  21.   .TextMatrix(i, 8) = rsdis("qtyc")
  22.    .TextMatrix(i, 9) = rsdis("remarks")
  23.  
  24.    .Rows = .Rows + 1
  25.    rsdis.MoveNext
  26.    Next i
  27. End With
  28.  
  29. 'flxs.Enabled = True
  30. Else
  31.  
  32. Label5 = "No Records Found"
  33. flxs.Clear
  34.  
  35. flxs.FormatString = "         Name      | Material No |Material Name | Date & Time       | Shift |Qty Issued | Issuer No | Issuer Name | Qty Consumed "
  36. 'flxpatsearch.TextMatrix(1, 0) = "Patient No"
  37.  '   flxpatsearch.TextMatrix(2, 0) = "Name"
  38.   '  flxpatsearch.TextMatrix(3, 0) = "Sex"
  39.    ' flxpatsearch.TextMatrix(4, 0) = "Age"
  40.     'flxpatsearch.TextMatrix(5, 0) = "Place"
  41.     'flxpatsearch.TextMatrix(6, 0) = "Phone"
  42.  
  43.  
  44. 'flxs.Visible = False
  45.  
  46. End If
  47.  
  48.  
  49. KeyAscii = 0        ' Ignore this key.
  50.          End If
Apr 22 '14 #1
0 921

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

Similar topics

1
1948
by: mike | last post by:
regards: when nokia mobile browser at the first time access HTTP Server, What kind of "HTTP request" does the nokia mobile browser give to the HTTP Server? thank you May goodness be with you...
6
3692
by: Ecohouse | last post by:
I have a computer with XP on it. I loaded Office 97 first because I needed Access 97 for some work. I then loaded Office 2000. Everything seemed to be running fine. But I have come across a few...
4
2794
by: Squirrel | last post by:
I've developed an Access 2002 database which will be deployed with the backend on a server and frontend on the users' PCs. I've now been advised that new employees will be given laptops with...
3
34843
by: alfredo17 | last post by:
Some can help me to extract String by String from ArrayList. I can add an String but now I would like to read item by item from an ArrayList. Thanks
2
2558
by: Dale | last post by:
Access 2003 I have an access database used for scoring a high school sporting event. Data is entered as scores are turned in from the different events throughout the day. I would like to...
3
4660
by: MBMSOFT | last post by:
Any idea How to prevent from different date/time format on different pc I've heard that I should create my own system time function in VBA which will not depend from the local pc system date/time...
3
1415
by: trixxnixon | last post by:
Has anyone had a situation where they had to supply end users with a frontend for a database that was created with a different version of access that the table is housed in? my database was...
1
7356
by: gbenga | last post by:
am developing a project point of sales in VB6.0. I need a code to deduct the sold item from the data base . each time they make sale it will automatically deduct from the quantity in the database and...
0
7124
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
7326
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
7385
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...
1
7046
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
1558
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.