G
Guest
Using Access 2007, I am creating a temporary table [ActivityTrker] which will
feed a master table [MeetingMaster]. The reason for this is because the user
wants to do "bulk" selection and not have to do one person at a time; plus,
the meetings can be one of 30 types, and they can take place any time, any
day of the week; thus, no preloading a table with Meeting date/time and just
asking for attendance.
I have searched this and other forums, asked for help once before, have
researced multiple books/web sites, and not really found any help so far.
Right now, I am not able to get the query to accept the fields coming from
the form as valid fields.
What results from the following code is that the query wants to treat the
input fields as parameters and wants me to re-enter the information, which,
due to the need of having the combo box "comboTypeContact," this is
unacceptable, unless someone knows how to make a combo box a parameter. I am
sure it has been done, but I sure don't know how to do it.
Any help greatly appreciated.
fs
Please note the followings code:
Public Sub BulkMMcmd_Click()
Dim strTblBldqry As String
Dim typeofcontact As String
Dim activitydate As Date
Dim dbs As Database
Dim mintimecredit As Integer
Dim rsTbl As Recordset
Dim attended As CheckBox
Dim tkrname As String
tkrname = "ActivityTrker"
typeofcontact = Me.comboTypeContact.Value
activitydate = Me.dateActivity.Value
mintimecredit = Me.TimeCredit.Value
'Due to the wrapping in the Message box, this string looks like it lacks
ending
'line identifiers; however, the "typeofcontact" line is part of the first
line. fs
strTblBldqry = "SELECT DISTINCT L8Names.stu_name, L8Names.stu_id,
typeofcontact, activitydate, " & _
"mintimecredit, L8Names.attended INTO ActivityTrker " & _
"FROM L8Names;"
DoCmd.RunSQL strTblBldqry
DoCmd.OpenTable tkrname, acViewNormal
DoCmd.Save acTable, tkrname
DoCmd.Close acTable, tkrname
End Sub
feed a master table [MeetingMaster]. The reason for this is because the user
wants to do "bulk" selection and not have to do one person at a time; plus,
the meetings can be one of 30 types, and they can take place any time, any
day of the week; thus, no preloading a table with Meeting date/time and just
asking for attendance.
I have searched this and other forums, asked for help once before, have
researced multiple books/web sites, and not really found any help so far.
Right now, I am not able to get the query to accept the fields coming from
the form as valid fields.
What results from the following code is that the query wants to treat the
input fields as parameters and wants me to re-enter the information, which,
due to the need of having the combo box "comboTypeContact," this is
unacceptable, unless someone knows how to make a combo box a parameter. I am
sure it has been done, but I sure don't know how to do it.
Any help greatly appreciated.
fs
Please note the followings code:
Public Sub BulkMMcmd_Click()
Dim strTblBldqry As String
Dim typeofcontact As String
Dim activitydate As Date
Dim dbs As Database
Dim mintimecredit As Integer
Dim rsTbl As Recordset
Dim attended As CheckBox
Dim tkrname As String
tkrname = "ActivityTrker"
typeofcontact = Me.comboTypeContact.Value
activitydate = Me.dateActivity.Value
mintimecredit = Me.TimeCredit.Value
'Due to the wrapping in the Message box, this string looks like it lacks
ending
'line identifiers; however, the "typeofcontact" line is part of the first
line. fs
strTblBldqry = "SELECT DISTINCT L8Names.stu_name, L8Names.stu_id,
typeofcontact, activitydate, " & _
"mintimecredit, L8Names.attended INTO ActivityTrker " & _
"FROM L8Names;"
DoCmd.RunSQL strTblBldqry
DoCmd.OpenTable tkrname, acViewNormal
DoCmd.Save acTable, tkrname
DoCmd.Close acTable, tkrname
End Sub