This is a copy of a message I previously posted in a Microsoft Access Newsgroup, but it was suggested to me that my problem is ASP related and not Access, and hence I'm posting in this newsgroup now instead.
Hi everyone,
I've got quite a specific query that I'm trying to resolve with Microsoft Access and I'm hopeful someone out there can offer a solution to my problem.
I have records that I'm displaying on a web page from an Access database and what I would like to do is include a 'Buy Now' button at the end of each record, so when the particular .aspx page is accessed through a users browser and the data pulled from the database, it looks something like the following:
Product A Description A Price A 'Buy Now Button'
Product B Description B Price B 'Buy Now Button'
Product C Description C Price C 'Buy Now Button'
I'm trying to avoid having to manually add the button to the record by way of an OLE Object field, I fear that could be really time consuming. I have some code that will work behind each button but I need to find a way around two specific problems:
Firstly, how to display the same 'Buy Now' button (or image) at the end of each record, without the necessity to add it manually to the web page - and for obvious reasons this would be a headache scenario because new records will be added and old ones deleted on a regular basis. I therefore need an automated way to include this button each time a new record is added.
The second issue I have is how to change two of the components within that code so each Buy Now button will represent the unique product it is displayed next to, for example I need to work out how to change the 'Product Name' and 'Price' within the code so its identical to the 'Product Name' and 'Price' from that particular row of data, and obviously without the necessity again to do this manually each time a new record is added.
I know this sounds complicated but I am sure there must be a way around this, perhaps using Visual Basic for Applications within the Access Database itself, but I'm not a programmer so I'm a little unsure how to apply the correct VB code to accomplish this task.
If anyone has a suitable solution for this problem I really would be grateful.
Many thanks
Wayne
As a footnote, I'm running FrontPage 2003, Access 2003 and IIS 6.0 on a Windows 2003 Datacentre Server with ASP.NET 1.1 Installed