html template (1 Viewer)

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
I want to export a table to html. I would like to use a template but can't seem to find any good info on how to do this?

Thanks.
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:54
Joined
Oct 29, 2018
Messages
18,793
Can you to show us the template? Maybe you can just use code to simulate it. Just thinking out loud...
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
I don't have a template?
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
I see you can add or export data and use a template. I guess I need a template first. Any templates out there geared toward MS Access tables?
Where does the table data go?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:54
Joined
Oct 29, 2018
Messages
18,793
I see you can add or export data and use a template. I guess I need a template first. Any templates out there geared toward MS Access tables?
Where does the table data go?
Ah, you were talking about the Export With Formatting macro action, right? If so, I think the template file argument may be optional.
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
Yes but I would like to use a template to make my data look better, rather than the raw export.
 

plog

Banishment Pending
Local time
Yesterday, 18:54
Joined
May 11, 2011
Messages
10,867
1. Do you know HTML and CSS?

2. Is this a 1 time thing or will this be repeated regularly?
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
HTML and it will be repeated regularly.
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
Is it possible to make the export be more than just static? Maybe sort by columns, search?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:54
Joined
Oct 29, 2018
Messages
18,793
Is it possible to make the export be more than just static? Maybe sort by columns, search?
Perhaps it would be easier if you could show us what you mean. For example, show us the original data, the export result, and the formatted outcome you desire.
 

plog

Banishment Pending
Local time
Yesterday, 18:54
Joined
May 11, 2011
Messages
10,867
So if its the same table you can make a query to spit out your data encoded with html:

tblYourData
EmpName, EmpDept, EmpAge
Sally, HR, 31
Dave, Sales, 41
Tim, Warehouse, 22

Then you make a query to produce that data in a row surrounded by the necessary HTML:

Code:
SELECT "<tr><td class='DataRow'>" & EmpName & "</td><td class='DataRow'>" & EmpDept & "</td><td class='DataRow'> & EmpAge & "</td></tr>"
FROM tblYourData

Export the query to a text file and you have the HTML encoded data. Paste it into your main document (surrounded by the correct HTML) and you can then style it however you want with a CSS file that defines 'DataRow'.

You cannot make that data dynamic once exported to HTML. You can make the query sort and search the data prior though.
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
It would basically be a customer table. Name, address, age, etc...
I would like to be able to sort the columns and do a search too.
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
I see... It looks like it will have to be static or use a company that take the database and converts it online. Like Caspio or Kintone.
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
Anyone have any experience with those companies?
 

plog

Banishment Pending
Local time
Yesterday, 18:54
Joined
May 11, 2011
Messages
10,867
This a hobby project or for your company? This is realy a simple task with the right tools. Access isn't the right tool for a database that feeds websites though. Can you give us a big picture of who this is for--why must it be on the web?
 

kitty77

Registered User.
Local time
Yesterday, 19:54
Joined
May 27, 2019
Messages
550
company. I would like my customer's to have the ability to see their customers info. How else would they get that data?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:54
Joined
Oct 29, 2018
Messages
18,793
I see... It looks like it will have to be static or use a company that take the database and converts it online. Like Caspio or Kintone.
Sounds like when you say HTML, you actually means a website. I have experience with Caspio, but I am not sure you really want to use it. What is the data going to be used for? Who will use it?
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 16:54
Joined
Oct 29, 2018
Messages
18,793
company. I would like my customer's to have the ability to see their customers info. How else would they get that data?
So, your customers have their own customers? Are you giving them an Access application? If so, can't they see their own data using your Access application?
 

Users who are viewing this thread

Top Bottom