Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2004, 02:56 AM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default manipulate recordset

hi,
i need some adivise:
I have to work with a database of bad design.There is a field of name, country and then there are fields :
information_text1 information_text1_date ,
information_text2 information text2_date
......
information_text5 information text_5 date.

I have generated a query in Access, e.g. selecting all Italien countries. What I want to do now is to manipulate the Recordset, that I get for every italian country, also the date of the last information_textX field, where something is written (information about last change). Therefore i need to look for every recordeset in the 5 information_text fields, (from 5-1) and if I find in one field the information, i have to get the date.
I will use this query in a report, so i need name, country and the required date.
Please if you have an idea, let me know
thx andy

 
Old May 30th, 2004, 05:46 PM
Authorized User
 
Join Date: Oct 2003
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You could directly, in design view of the query, specify in each information_text1 field, <>IsNull. only the records where data is present will show on the query & with the date field adjacent. Attach this to recordsource of Desired Report.
Or open a recordset, specify the criteria, have the result populate another table, or form etc...

Dim stSQL as string
Dim rec as ADODB.RecordSet
set rec = New ADODB.RecordSet

stSQL = "SELECT .* " & _
        "FROM tblName " & _
        "WHERE tblName.Information_text1 <> IsNull Or tblName.Information_text2 <> IsNull Or tblName.Information_text3 <> IsNull Or etc.. (I Forget if it's "Not IsNull" or "<> Null")

rec.open stSQL CurrentProject.Connection,adOpenDynamic,adLockOpti mistic

within this recordset, you can manipulate accordingly...
..maybe a start?
good luck!






Similar Threads
Thread Thread Starter Forum Replies Last Post
How do you use scripting to manipulate registry? Ruben VBScript 3 September 13th, 2006 09:36 AM
How to manipulate diagramms? zip Crystal Reports 1 June 12th, 2006 11:20 AM
how to manipulate recordsets allang PHP Databases 1 September 25th, 2004 01:21 PM
manipulate variable Thodoris SQL Server 2000 2 May 28th, 2004 03:27 AM
how to manipulate recordset allang Classic ASP Databases 1 November 3rd, 2003 05:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.