עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

עזרה בחיפוש sql ב-vb

Featured Replies

פורסם

Private Sub Text3_Change()
List1.Clear
strsearch = "SELECT * FROM [agafim]" _
& " WHERE [rspon_first_name] LIKE '*" & Text3.Text & "*'"


Set rs = db.OpenRecordset(strsearch)


If rs.RecordCount > 0 Then
For i = 0 To rs.RecordCount - 1
f_name = rs![rspon_first_name]
List1.AddItem f_name + " " + rs![rspon_last_name]
Next i
Else
MsgBox ("NO RESULSTS")
End If

End Sub

יש לי בעיה עם הקוד הזה. למשל: אני לוחץ "נ" אז הוא משום מה מוצא לי רק "נועה" למרות שהוא אמור גם למצוא "נמרוד" או "נאור"..

זה ממש דחוף! זה לפרויקט שלי במחשבים.

אז אשמח אם מישהו יבין מה הבעיה ויעזור לי..תודה!!

נ.ב

לא מצאתי איך עושים code בהודעה הזאת..

** נערך **

עכשיו יש קוד

פורסם

ב SQL לא רושמים כוכבית לחיפוש כולל אלא %, כלומר:

select * from table where user like '%נ%'

פורסם


For i = 0 To rs.RecordCount - 1
f_name = rs![rspon_first_name]
List1.AddItem f_name + " " + rs![rspon_last_name]
Next i

מה אתה עושה פה ?

אם המכונה מצאה לך 3 התאמות לדוגמא כמו שאמרת עם "נועה" , הוא יכניס את אותה "נועה" 3 פעמים

אתה לא מתקדם ברשומות אתה נשאר כל הריצה על אותה רשומה

תעבוד עם לולאת while ולא for ובתוך הלולאה תקדם את הרשומה כדי להתקדם בכל התוצאות חיפוש ע"י מתודה FindNext

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.