salgergawi
Registered User.
- Local time
- Tomorrow, 00:29
- Joined
- Sep 28, 2013
- Messages
- 23
Hello,
I have in a form this code but i need to add image path for HTML to export the FinalTable to Web "HTML" format
specially my point in
The full code is :-
I have in a form this code but i need to add image path for HTML to export the FinalTable to Web "HTML" format
specially my point in
Code:
rstInsert(RTrim(rst![Attacking])) = "<img src=Attack.png>"
The full code is :-
Code:
Option Compare Database
Private Sub CreateCrosstab_Click()
Dim dbs As dao.Database, rst As Recordset, rstInsert As dao.Recordset
Set dbs = CurrentDb
Call DeleteTable("FinalTable")
dbs.Execute ("CreateTableQuery")
Set rstInsert = dbs.OpenRecordset("FinalTable", dbOpenDynaset)
Set rst = dbs.OpenRecordset("UniteName_Eshtibak")
If Not rst.EOF Then
Do
rstInsert.FindFirst ("Unite_Name = " & "'" & rst![Unite_Name] & "'")
rstInsert.Edit
If Not IsNull(rst![Attacking]) Then
rstInsert(RTrim(rst![Attacking])) = "<img src=Attack.png>"
End If
If Not IsNull(rst![Defenseing]) Then
rstInsert(RTrim(rst![Defenseing])) = "defense.png"
End If
If Not IsNull(rst![Nothing]) Then
rstInsert(RTrim(rst![Nothing])) = "nothing.png"
End If
rstInsert.Update
rst.MoveNext
Loop Until rst.EOF
End If
End Sub
Sub DeleteTable(TableName As String)
Dim dbs As Database, ctr As Container, doc As Document
Set dbs = CurrentDb
Set ctr = dbs.Containers!Tables
For Each doc In ctr.Documents
If UCase(doc.Name) = UCase(TableName) Then
DoCmd.DeleteObject acTable, doc.Name
Exit For
End If
Next doc
dbs.Close
Set dbs = Nothing
End Sub