473,387 Members | 1,757 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.

How to search the file on the 2 table

1
Now i try to develop vb file using access database.

i have 2 difrent tabe but i have create realtion with this 2 table

my problem when i try to search file from database there only display one file table only but the other table not move together.
i need your help to check my coding and please verify.

Private Sub cmdOK_Click()
adoMak.CommandType = adCmdText
adoMak.RecordSource = "Select * from maklumat order by [nokomputer]"
adoMak.Refresh
adoMak.Recordset.Find " nokomputer like " & "'" & txtkomp.Text & "*'"
If Trim(txtkomp) = "" Then
MsgBox "Sila Masukkan No Komputer", , "MESEJ"
txtkomp.SetFocus
ElseIf adoMak.Recordset.EOF Then
MsgBox "Tiada Rekod Ini", , "MESEJ"
txtkomp.Text = ""
txtkomp.SetFocus
End If
txtkomp.Text = ""
cmdOK.Enabled = False
End Sub
Sep 26 '07 #1
2 954
debasisdas
8,127 Expert 4TB
As you have posted a question in the articles section it is being moved to VB Forum.

MODERATOR
Sep 26 '07 #2
jrtox
89
Now i try to develop vb file using access database.

i have 2 difrent tabe but i have create realtion with this 2 table

my problem when i try to search file from database there only display one file table only but the other table not move together.
i need your help to check my coding and please verify.

Private Sub cmdOK_Click()
adoMak.CommandType = adCmdText
adoMak.RecordSource = "Select * from maklumat order by [nokomputer]"
adoMak.Refresh
adoMak.Recordset.Find " nokomputer like " & "'" & txtkomp.Text & "*'"
If Trim(txtkomp) = "" Then
MsgBox "Sila Masukkan No Komputer", , "MESEJ"
txtkomp.SetFocus
ElseIf adoMak.Recordset.EOF Then
MsgBox "Tiada Rekod Ini", , "MESEJ"
txtkomp.Text = ""
txtkomp.SetFocus
End If
txtkomp.Text = ""
cmdOK.Enabled = False
End Sub
Please let me know if "maklumat" is a Table or a Query on your MSAccess.
You must Build an SQL statement that Link between your two 2 tables.
Sep 27 '07 #3

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

Similar topics

1
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
5
by: Abby Lee | last post by:
My code does what I want (works unless there is a lot of volume...works for this month cause not a lot of items marked paid yet...) but the page times out for last month because there is just so...
4
by: Gobi | last post by:
Hello, I have a Database with lists of Clients in each. Every year a new tables is created with the naming convention "CloseYear" ie close1999, close2000 There are tables from this year back to...
1
by: jrs_14618 | last post by:
Hello All, This post is essentially a reply a previous post/thread here on this mailing.database.myodbc group titled: MySQL 4.0, FULL-TEXT Indexing and Search Arabic Data, Unicode I was...
1
by: Eric | last post by:
Hi: I have two files. I search pattern ":" from emails text file and save email contents into a database. Another search pattern " field is blank. Please try again.", vbExclamation + vbOKOnly...
19
by: bb nicole | last post by:
Below is my search engine for job portal which jobseeker can find the job through quick search. But it cant work... Is it mysql query got problem?? Thanx.. Interface <html> <head> <title>UMS...
8
by: stunna | last post by:
Hi there, i want to implement a a system to search for a file in a folder using the file name and if its there, i want it to be displayed. I have one through a couple of books on how to implement...
3
by: fjm | last post by:
Hello all, I have 2 files. index.php which is a log in page and a search page. After the user logs in they are taken to the search page by way of a checklogin script that verifies the user. ...
1
Merlin1857
by: Merlin1857 | last post by:
How to search multiple fields using ASP A major issue for me when I first started writing in VB Script was constructing the ability to search a table using multiple field input from a form and...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.