Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 9th, 2005, 08:11 PM
Registered User
 
Join Date: Oct 2005
Location: , , .
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.

Reply With Quote
  #2 (permalink)  
Old October 13th, 2005, 06:41 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
  #3 (permalink)  
Old October 13th, 2005, 06:42 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:19 PM.


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