1
123
I hope help:
In this code you see word in capital letter this word my problem:
What I want I want to say to INSERT INTO sentences take the field name from
the active form name…
So I do
Dim FORMNAME
FORMNAME = Screen!ActiveForm!Name
And put the formname as field name for INSERT INTO Sentences
But my code not work
Any idea or help
Hope understand me.
-----------------Code start----------------------------------
Dim FORMNAME
FORMNAME = Screen!ActiveForm!Name
Dim cdl As CommonDlg
Set cdl = New CommonDlg
cdl.CancelError = True
cdl.ShowColor
Screen.ActiveForm.Section(0).BackColor = cdl.color
Dim sql As String
sql = "INSERT INTO tblcolor (FORMNAME) VALUES (" &
Screen.ActiveForm.Section(0).BackColor & ");"
CurrentDb.Execute sql, dbFailOnError
-------------code end
In this code you see word in capital letter this word my problem:
What I want I want to say to INSERT INTO sentences take the field name from
the active form name…
So I do
Dim FORMNAME
FORMNAME = Screen!ActiveForm!Name
And put the formname as field name for INSERT INTO Sentences
But my code not work
Any idea or help
Hope understand me.
-----------------Code start----------------------------------
Dim FORMNAME
FORMNAME = Screen!ActiveForm!Name
Dim cdl As CommonDlg
Set cdl = New CommonDlg
cdl.CancelError = True
cdl.ShowColor
Screen.ActiveForm.Section(0).BackColor = cdl.color
Dim sql As String
sql = "INSERT INTO tblcolor (FORMNAME) VALUES (" &
Screen.ActiveForm.Section(0).BackColor & ");"
CurrentDb.Execute sql, dbFailOnError
-------------code end