473,382 Members | 1,359 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,382 software developers and data experts.

searching for a specific record

schatsi
hi there

im a vb developer - battling with access :) - 2002
i need to search for a specific record within a table in my current db

this is what i tried

Dim rst As Recordset
Dim imported As String
Set rst = CurrentDb.OpenRecordset("SELECT ImportChecker.DateOfImport, ImportChecker.ImportedAlready, ImportChecker.File FROM ImportChecker WHERE (((ImportChecker.DateOfImport)='" & Format(Now, "dd/MM/yyyy") & "') AND ((ImportChecker.File)='" & fileName & "'))"


Please HELP !!!
May 24 '07 #1
1 1344
JConsulting
603 Expert 512MB
hi there

im a vb developer - battling with access :) - 2002
i need to search for a specific record within a table in my current db

this is what i tried

Dim rst As Recordset
Dim imported As String
Set rst = CurrentDb.OpenRecordset("SELECT ImportChecker.DateOfImport, ImportChecker.ImportedAlready, ImportChecker.File FROM ImportChecker WHERE (((ImportChecker.DateOfImport)='" & Format(Now, "dd/MM/yyyy") & "') AND ((ImportChecker.File)='" & fileName & "'))"


Please HELP !!!
Expand|Select|Wrap|Line Numbers
  1. Dim rst As DAO.Recordset
  2. Dim imported As String
  3. Dim strSQL As String
  4. ' Where is FileName coming from? the form?
  5. strSQL = "SELECT ImportChecker.DateOfImport, ImportChecker.ImportedAlready, ImportChecker.File FROM ImportChecker" & _
  6. " WHERE ImportChecker.DateOfImport=#" & Format(Now, "dd/MM/yyyy") & "# AND ImportChecker.File='" & FileName & "';"
  7. Set rst = CurrentDb.OpenRecordset(strSQL)
  8.  
see comments in the code
J
May 24 '07 #2

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

Similar topics

0
by: Benny Eckert | last post by:
Hi everybody, Me and my colleague use the same DB under win98 Access 2000. He recently upgraded to win2K, same access version. When I search a specific record in a form using a "search...
9
by: Jack-of-all-traits | last post by:
I have certain words, or groups of words (4 or less) input in my fields in Access 2002 xp pro atmosphere. The data is essentially in the tables., so what I want to do is get access with the...
1
by: David | last post by:
Hello, I use the VS .NET 2003. Say I have a Windows form (with C# code, of course) which is connected to a database to one table. I can browse through the records, but I don't know how to...
0
by: fig000 | last post by:
Hi, I'm trying to use the sqldatasource control and a detailsview to create a fully functional data entry screen; it's quite easy. I can see the strength of creating a master grid associated...
0
by: Roald van Geleuken | last post by:
Been trying a few things but not been able to solve this so far. I have 3 tables: - source data shown in a paged gridview - processed data (1 or more records per source record) shown in paged...
11
by: TheDataGuy | last post by:
Using MS ACCESS 2002 I developed a FORM, and within that FORM, I created and added a SEARCH BUTTON, and then I created a SUB-FORM, so that when an the END USER clicks on the FORM it will POP-UP...
7
by: john | last post by:
In my form I have a master table and a details table linked 1xM. I can search through the whole parent table but I also like to be able to search through the child table fields to find parent...
4
by: Hunk | last post by:
Hi I have a binary file which contains records sorted by Identifiers which are strings. The Identifiers are stored in ascending order. I would have to write a routine to give the record given...
3
by: Ahmad Jalil Qarshi | last post by:
Hi, I have a text file having size about 2 GB. The text file format is like: Numeric valueAlphaNumeric values Numeric valueAlphaNumeric values Numeric valueAlphaNumeric values For example...
20
by: tkip | last post by:
Hello everyone. I have been working on this DB for quite some time and still can't figure out a way to do what I want to do. It's a database that keep track of drawings and engineering change etc....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...
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...

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.