Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
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 October 9th, 2005, 08:11 PM
Registered User
 
Join Date: Oct 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to display a access webpage on current date

Hi,every one.
I am a newbie to access vba.

Now I got a problem.I generated a webpage from a table of access to display the records in the table.

The problem is that everytime I open the web page ,it starts at the first
record.There is a date data in every record.For example,the first record is Oct,1st.I wanna to see the current date record on the first sight I open the web page.For example,today is Oct,10th.I wanna to see the Oct,10th record when I open the web page.

I don't know whether vba is availalbe in a web page.

Anyway,I will be appreciated if anyone can give me any suggestion.

Thanks in advance.

 
Old October 13th, 2005, 06:41 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Instead of posting the table, post a query with the data from the table you want to see, then sort the query on the date field descending, then set the Top Values property to 1. This will return only those records with the most current date each time.

Alternatively, in your asp code, you can capture today's date (Date()) and then in your ASP query do "SELECT * FROM tblMyTable WHERE [DateField] = " & TodaysDate

HTH

mmcdonal
 
Old October 13th, 2005, 06:42 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Actually, the query above will return only the most current record. If there is more than one record with the latest date, then you may want to sort on another field as well to get the one you want.

The second alternative will give you all the records with TodaysDate.


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Display current date and time in a webform TextBox cesemj ASP.NET 2.0 Basics 4 October 22nd, 2007 04:07 PM
display count results and image in webpage carswelljr SQL Language 2 April 19th, 2007 09:44 AM
Display file Access and Created date scoobie Java Basics 1 March 16th, 2007 06:53 AM
Display icon on a webpage rroohhiitt C# 3 February 24th, 2006 08:12 PM
display a pdf in a webpage crmpicco Classic ASP Basics 3 February 8th, 2005 09:59 AM





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