Input from Form, Create fields for Query which joins them with lis

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
 
0
Utf
8/27/2007 2:30:02 PM
access.formscoding 7493 articles. 0 followers. Follow

6 Replies
1055 Views

Similar Articles

[PageSpeed] 38

On Aug 27, 9:30 am, franks <fra...@discussions.microsoft.com> wrote:
> 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

Usually, this only happens if Access can't find the fields in the
table.  What is your table structure?

0
OldPro
8/27/2007 3:53:40 PM
I am trying to take a table [L8Names], which has all of the names that could 
be selected as having attended, and it has the following fields:  stu_id, 
stu_name, attended (which is just a null check box).  I am trying to add to 
each row of this table then the fields from the unbounded form.

The end results is suppose to be my temporary selection table, which would 
then be appended into the master table.

fs

"OldPro" wrote:

> On Aug 27, 9:30 am, franks <fra...@discussions.microsoft.com> wrote:
> > 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
> 
> Usually, this only happens if Access can't find the fields in the
> table.  What is your table structure?
> 
> 
0
Utf
8/27/2007 4:24:06 PM
On Aug 27, 11:24 am, franks <fra...@discussions.microsoft.com> wrote:
> I am trying to take a table [L8Names], which has all of the names that could
> be selected as having attended, and it has the following fields:  stu_id,
> stu_name, attended (which is just a null check box).  I am trying to add to
> each row of this table then the fields from the unbounded form.
>
> The end results is suppose to be my temporary selection table, which would
> then be appended into the master table.
>
> fs
>
>
>
> "OldPro" wrote:
> > On Aug 27, 9:30 am, franks <fra...@discussions.microsoft.com> wrote:
> > > 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
>
> > Usually, this only happens if Access can't find the fields in the
> > table.  What is your table structure?- Hide quoted text -
>
> - Show quoted text -

I believe you are having some conceptual issues, as this doesn't make
much sense, unless you are leaving out important information.  If you
are trying to create an input screen where several records can be
added at one time to a master table, then a new table has to be
created to hold these items until they are appended to the master
table.  There are different ways to model the input screen.  One way
would be to add one text box for each field, add a command button
which would load the record into the temporary table and a listbox to
display the contents of the temporary table.  Another command button
would copy the records to the master table.  Another way would be to
create your own grid.  It would need scrollbars if all of the records
can not fit on one screen.  It would also need editing controls that
are positioned over each cell as it becomes active.

0
OldPro
8/27/2007 7:10:37 PM
Hey, "OldPro":

I feel as if we have made a great breakthrough, even though I am still where 
I was.  

"If you
> are trying to create an input screen where several records can be
> added at one time to a master table, then a new table has to be
> created to hold these items until they are appended to the master
> table."  

Exactly.  I have a form which has all of the variable information.  An 
unbounded text box for "Type of Contact," an unbounded text box for "Activity 
Date," and finally, an unbounded text box with the "Time credit for the 
meeting."  I am so sorry that my communication is so bad that I did not get 
that across.  Of course, it would have helped tremendously that I knew that I 
was trying all this time to create an "Input Screen."  Who would have thought 
it?  

After I gather all of the variables, I am then needing to put them into a 
table to be able to display them back to the user, along with the "CheckBox" 
field that would allow for selection from various ones who are in the cohort. 
 That is where the problem with the check box comes in.  I still am not able 
to get that thing to work.  I feel that if I could get this corner turned, it 
might be enough to at least allow my user to get started and buy me a little 
time.  Any suggestions?  

Again, I am deeply indebted for your kind direction.  I do feel like 
suddenly, a breath of air has been allowed in.  



"OldPro" wrote:

> On Aug 27, 11:24 am, franks <fra...@discussions.microsoft.com> wrote:
> > I am trying to take a table [L8Names], which has all of the names that could
> > be selected as having attended, and it has the following fields:  stu_id,
> > stu_name, attended (which is just a null check box).  I am trying to add to
> > each row of this table then the fields from the unbounded form.
> >
> > The end results is suppose to be my temporary selection table, which would
> > then be appended into the master table.
> >
> > fs
> >
> >
> >
> > "OldPro" wrote:
> > > On Aug 27, 9:30 am, franks <fra...@discussions.microsoft.com> wrote:
> > > > 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
> >
> > > Usually, this only happens if Access can't find the fields in the
> > > table.  What is your table structure?- Hide quoted text -
> >
> > - Show quoted text -
> 
> I believe you are having some conceptual issues, as this doesn't make
> much sense, unless you are leaving out important information.  If you
> are trying to create an input screen where several records can be
> added at one time to a master table, then a new table has to be
> created to hold these items until they are appended to the master
> table.  There are different ways to model the input screen.  One way
> would be to add one text box for each field, add a command button
> which would load the record into the temporary table and a listbox to
> display the contents of the temporary table.  Another command button
> would copy the records to the master table.  Another way would be to
> create your own grid.  It would need scrollbars if all of the records
> can not fit on one screen.  It would also need editing controls that
> are positioned over each cell as it becomes active.
> 
> 
0
Utf
8/27/2007 8:16:01 PM
On Aug 27, 3:16 pm, franks <fra...@discussions.microsoft.com> wrote:
> Hey, "OldPro":
>
> I feel as if we have made a great breakthrough, even though I am still where
> I was.
>
> "If you
>
> > are trying to create an input screen where several records can be
> > added at one time to a master table, then a new table has to be
> > created to hold these items until they are appended to the master
> > table."
>
> Exactly.  I have a form which has all of the variable information.  An
> unbounded text box for "Type of Contact," an unbounded text box for "Activity
> Date," and finally, an unbounded text box with the "Time credit for the
> meeting."  I am so sorry that my communication is so bad that I did not get
> that across.  Of course, it would have helped tremendously that I knew that I
> was trying all this time to create an "Input Screen."  Who would have thought
> it?
>
> After I gather all of the variables, I am then needing to put them into a
> table to be able to display them back to the user, along with the "CheckBox"
> field that would allow for selection from various ones who are in the cohort.
>  That is where the problem with the check box comes in.  I still am not able
> to get that thing to work.  I feel that if I could get this corner turned, it
> might be enough to at least allow my user to get started and buy me a little
> time.  Any suggestions?
>
> Again, I am deeply indebted for your kind direction.  I do feel like
> suddenly, a breath of air has been allowed in.

Enough with the sarcasm, I'll try to be more helpful.
Here is the way that I would do it.  You will still need to add the
code for the listbox; if you click a record in the listbox, it should
refresh the edit controls with that record (in case it needs
editing).  You may also want a Clear button to clear the input
controls.  Setup the combobox cmbName to allow the user to retreive
both name and ID when they select the name.  I am using my own names
for everything; I am partial to my own naming conventions.  The
functions should be self-explanatory.  The combobox and the listbox
are bound controls, the form is not.  You probably already know how to
bind them correctly.

Dim sName as string
Dim sID as string
Dim sContactType as string
Dim sActivityDate as string
Dim sMinimumTimeCredit as string
Dim bAttended as boolean

Private sub RefreshScreen
   txtName=sName
   txtID=sID
   txtContactType=sContactType
   txtActivityDate=sActivityDate
   txtMinimumTimeCredit =sMinimumTimeCredit
   chkAttended=bAttended
End sub

Private sub ReadRecord(sRecordKey as string)
   Dim db as dao.database
   Dim rs as dao.recordset
   set db=currentdb()
   set rs=db.openrecordset("tblActivityTracker",dbOpenSnapshot)
   With rs
      .FindFirst "[ID]=" & sRecordKey
      If Not .NoMatch then
         sName = .Name
         sID = .ID
         sContactType = .ContactType
         sActivityDate = .ActivityDate
         sMinimumTimeCredit = .MinimumTimeCredit
         bAttended = .Attended
      Endif
   End with
   rs.close
   set rs=nothing
   db.close
   set db=nothing
End sub

Private sub WriteRecord(sRecordKey as string)
   Dim db as dao.database
   Dim rs as dao.recordset
   set db=currentdb()
   set rs=db.openrecordset("tblActivityTracker",dbOpenDynaset)
   With rs
      .FindFirst "[ID]='" & sRecordKey & "'"
      If Not .NoMatch then
         .Edit
      Else
         .Addnew
      Endif
      .Name =  sName
      .ID = sID
      .ContactType = sContactType
      .ActivityDate = cdate(sActivityDate)
      .MinimunTimeCredit = sMinimumTimeCredit
      .Attended = bAttended
      .Update
   End With
End sub

Private sub SaveEdit
   sName = cmbName
   sID = txtID
   sContactType=txtContactType
   sActivityDate = txtActivityDate
   sMinimumTimeCredit = txtMinimumTimeCredit
   bAttended = chkAttended
End sub

Private sub cmdAdd_click
   SaveEdit
   WriteRecord txtID
   ClearEdit
End sub

Private sub ClearEdit
   cmbName = ""
   txtID = ""
   txtContactType = ""
   txtActivityDate= ""
   txtMinimumTimeCredit  = ""
   chkAttended = false
   sName = ""
   sID = ""
   sContactType = ""
   sActivityDate = ""
   sMinimumTimeCredit = ""
   bAttended = false
End sub

Private sub cmdBatchAdd
   Dim db as dao.database

   set db=currentdb()
   db.execute "Insert Into tblMeetingMaster
(Name,ID,ContactType,ActivityDate,MinimumTimeCredit,Attended) Select
Name, ID,ContactType,ActivityDate, MinimumTimeCredit,Attended From
tblActivityTracker"
   db.close
   set db = nothing
   ' Put code here to refresh the listbox

   ClearEdit
End sub

0
OldPro
8/28/2007 3:40:09 PM
Believe me when I say I am truly thankful for any and all help.  I have been 
programming since the early 80's starting with a T.I. DS990 (I believe it 
was) Model 1, have even done the I.B.M. stint and zoomed along just fine 
until trying to tangle with VB and its step-child VBA.  Never in all of my 
life have I seen so much effort to do so little.  

Anyway, I do appreciate your help.  No, it probably is not a safe bet to say 
I know the proper way to do anything.  Not from lack of trying.  Just a lack 
of connecting the dots.  But this does help.  My poor end user who has to 
start using this Monday will get something, but I am not sure if they will 
ever get a "bulk selector."  Not your fault, by any means.  Mine totally.  
Well, thanks again.  

Your totally indebted servant,
Frank

"OldPro" wrote:

> On Aug 27, 3:16 pm, franks <fra...@discussions.microsoft.com> wrote:
> > Hey, "OldPro":
> >
> > I feel as if we have made a great breakthrough, even though I am still where
> > I was.
> >
> > "If you
> >
> > > are trying to create an input screen where several records can be
> > > added at one time to a master table, then a new table has to be
> > > created to hold these items until they are appended to the master
> > > table."
> >
> > Exactly.  I have a form which has all of the variable information.  An
> > unbounded text box for "Type of Contact," an unbounded text box for "Activity
> > Date," and finally, an unbounded text box with the "Time credit for the
> > meeting."  I am so sorry that my communication is so bad that I did not get
> > that across.  Of course, it would have helped tremendously that I knew that I
> > was trying all this time to create an "Input Screen."  Who would have thought
> > it?
> >
> > After I gather all of the variables, I am then needing to put them into a
> > table to be able to display them back to the user, along with the "CheckBox"
> > field that would allow for selection from various ones who are in the cohort.
> >  That is where the problem with the check box comes in.  I still am not able
> > to get that thing to work.  I feel that if I could get this corner turned, it
> > might be enough to at least allow my user to get started and buy me a little
> > time.  Any suggestions?
> >
> > Again, I am deeply indebted for your kind direction.  I do feel like
> > suddenly, a breath of air has been allowed in.
> 
> Enough with the sarcasm, I'll try to be more helpful.
> Here is the way that I would do it.  You will still need to add the
> code for the listbox; if you click a record in the listbox, it should
> refresh the edit controls with that record (in case it needs
> editing).  You may also want a Clear button to clear the input
> controls.  Setup the combobox cmbName to allow the user to retreive
> both name and ID when they select the name.  I am using my own names
> for everything; I am partial to my own naming conventions.  The
> functions should be self-explanatory.  The combobox and the listbox
> are bound controls, the form is not.  You probably already know how to
> bind them correctly.
> 
> Dim sName as string
> Dim sID as string
> Dim sContactType as string
> Dim sActivityDate as string
> Dim sMinimumTimeCredit as string
> Dim bAttended as boolean
> 
> Private sub RefreshScreen
>    txtName=sName
>    txtID=sID
>    txtContactType=sContactType
>    txtActivityDate=sActivityDate
>    txtMinimumTimeCredit =sMinimumTimeCredit
>    chkAttended=bAttended
> End sub
> 
> Private sub ReadRecord(sRecordKey as string)
>    Dim db as dao.database
>    Dim rs as dao.recordset
>    set db=currentdb()
>    set rs=db.openrecordset("tblActivityTracker",dbOpenSnapshot)
>    With rs
>       .FindFirst "[ID]=" & sRecordKey
>       If Not .NoMatch then
>          sName = .Name
>          sID = .ID
>          sContactType = .ContactType
>          sActivityDate = .ActivityDate
>          sMinimumTimeCredit = .MinimumTimeCredit
>          bAttended = .Attended
>       Endif
>    End with
>    rs.close
>    set rs=nothing
>    db.close
>    set db=nothing
> End sub
> 
> Private sub WriteRecord(sRecordKey as string)
>    Dim db as dao.database
>    Dim rs as dao.recordset
>    set db=currentdb()
>    set rs=db.openrecordset("tblActivityTracker",dbOpenDynaset)
>    With rs
>       .FindFirst "[ID]='" & sRecordKey & "'"
>       If Not .NoMatch then
>          .Edit
>       Else
>          .Addnew
>       Endif
>       .Name =  sName
>       .ID = sID
>       .ContactType = sContactType
>       .ActivityDate = cdate(sActivityDate)
>       .MinimunTimeCredit = sMinimumTimeCredit
>       .Attended = bAttended
>       .Update
>    End With
> End sub
> 
> Private sub SaveEdit
>    sName = cmbName
>    sID = txtID
>    sContactType=txtContactType
>    sActivityDate = txtActivityDate
>    sMinimumTimeCredit = txtMinimumTimeCredit
>    bAttended = chkAttended
> End sub
> 
> Private sub cmdAdd_click
>    SaveEdit
>    WriteRecord txtID
>    ClearEdit
> End sub
> 
> Private sub ClearEdit
>    cmbName = ""
>    txtID = ""
>    txtContactType = ""
>    txtActivityDate= ""
>    txtMinimumTimeCredit  = ""
>    chkAttended = false
>    sName = ""
>    sID = ""
>    sContactType = ""
>    sActivityDate = ""
>    sMinimumTimeCredit = ""
>    bAttended = false
> End sub
> 
> Private sub cmdBatchAdd
>    Dim db as dao.database
> 
>    set db=currentdb()
>    db.execute "Insert Into tblMeetingMaster
> (Name,ID,ContactType,ActivityDate,MinimumTimeCredit,Attended) Select
> Name, ID,ContactType,ActivityDate, MinimumTimeCredit,Attended From
> tblActivityTracker"
>    db.close
>    set db = nothing
>    ' Put code here to refresh the listbox
> 
>    ClearEdit
> End sub
> 
> 
0
Utf
8/30/2007 3:06:05 PM
Reply:

Similar Artilces:

How to create a partition on an external USB drive?
Toshiba Tablet XP Home/Student with plenty of memory. I have the program DriveImage XML. At one point it says to create a partition somewhere for the image it's going to create. I have a 40G external plug and play HD. I'd like to create a partition on it without disturbing other files and folders I have on it. There's plenty of free space. Various resources say use XP Disk Management to create that partition. So when I go there it appears as they say but when they say click on the free space choose the selection "Create new partiton." I have right clicked ...

user created shapes non printing
I started have a problem with vision 2002 that I have not noticed before. When I create a new shape, by default, it assumes the non-printing properly under FORMAT � BEHAVIOR. Also if I group a set of "printing" shapes the group will become non-printing. Can I change this behavior? How are you creating the new shape? Also are you using layers in your document? -- Mark Nelson Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "Robert" <hammer_757@hotmail.com> wrote in message news:9ec427f7.0409231005.576...

Updating a table from Form Entry
I have a form that pops up when a user clicks a button to Print said form. The form is for the user to enter the name of the table and any footnotes for that particular form, this form is connected to a table that stores this information for everytime the report is printed. THe problem I having is that when the user enters the information and clicks [PRINT] the report is blank, when I open the table the info the user has entered has not updated onto the table yet. Is there a way so that when the user clicks [PRINT] the footnote table will update BEFORE the report prints? Larry -- Neve...

Update textbox on form
The following are events on two combo boxes on a subform "NewJobsSubform", the first sets the rowsource of the second and also sets a default value in the second. The second event sets the value in the text box "Sell" to the price associated with the RepProduct in cboRepProduct - collected from the table "RepairProducts". "Private Sub cboCatName_AfterUpdate() On Error Resume Next Me.cboRepProduct.RowSource = "SELECT RepairProduct.RepProduct FROM" & _ " RepairProduct WHERE CatName = '" & Me.cboCatName.Value...

Copy field data to multiple places
Newbi here.... I have a access 07 file of about 1000 records (rows) and a field (column) I'll call the "project number". All the records do not have the project number inserted as of yet. Is there a simple means to insert a project number in say 50 records at a time, another project number in another 75 records etc. Copy/Paste will do it but may take months to enter. Any suggestions appreciated. TIA On Wed, 27 Feb 2008 15:31:05 -0500, "Meebers" <justme@idontkno.com> wrote: >Newbi here.... I have a access 07 file of about 1000 records (rows) and ...

Forms Based Authentication
I have configured Exchange 2003 Server on Windows 2003 Server. Everything works , HTTP,HTTPS, OWA Password change , but whenever I enable forms based authentication I recieve an error "440 login timeout" and the page will not load. Pls Help Regards I hesitate, because it doesn't fully match your diagnosis but take a look at: http://support.microsoft.com/default.aspx?scid=kb;en- us;817379 to see if it's of any help. >-----Original Message----- >I have configured Exchange 2003 Server on Windows 2003 Server. Everything >works , HTTP,HTTPS, OWA Password change ,...

"All users" "Programs" create/modify shortcut from app...
Hi all, I've created two shortcuts into "Programs" folder for "All Users" It lets me to get them available for all user. The problem: Application running in "User" context needs to delete and re-create such links but it fails due to an "access denied" ... Settings correct permission to such links it starts working as well I've created links using the IShellLink/IPersistFile sehll interfaces. So, I actually need to have link under "programs" for "All Users" which might be modified by application running in "Users"...

How to create a connection point in Excel
When I group autoshapes the group itself does not have connection points. A connector connects to one of the grouped shapes instead. So, the connector beginconnecedshape (or endconnectedshape) property contains the name of the contained shape and not the name of the group. Is there a way to create connection points for a group? Alternatively, is it possible to change a group into a single shape with connection points? ...

Viewing an Excel sheet w/out all the empty fields...
How do you create a spreadsheet that only shows the fileds with data in them? -How do you get rid of all the empty rows/columns, to ease viewing for those who are easily confused by excel spreadsheets? (I don't know how else to emaplin my question... I just don't want the extra columns & rows there, if that's possible...) Please help... Hi! >I just don't want the extra columns & rows there, if that's possible... Just hide them! Suppose the last column in your sheet that contains data is column H. You can hide columns I:IV so that after column H all you ...

Validation Rule for field values
I have a database that includes a phone number field. I want to prevent a user from creating a new record that contains a phone number that is currently in a record that exists in the database.I am using a form for data entry into the table. Somehow I'd like for there to be a check to see if the phone number typed into the phone number field to be checked against existing phone numbers in the database.I've researched various sources but haven't been able to find the solution. I'm not familiar with VB so any replies that suggest using that will probably not work for me. Sorry, j...

Pivot table fields missing on all computers
I have Excel 2007 installed on two computers. I also have Excel 2010 beta installed on one of the computers. I am unable to create a pivot table on ANY of them. None will show the field list. All copies of Excel work fine in all other aspects. I have searched the net for solutions and found many others have the same problem but few suggestions to fix it. Many questions never got any response at all. I did find a reference to try removing the .xlb file from the XLStart folder. I did, with no results. I have done all the proper show/hide clicks. I even tried using the ...

Consecutive Query
Good Day, For your consideration I have the following question. I have a process that leads to the below dataset. Name Start Date End Date Chris 11/2/2008 11/9/2009 Joe 11/1/2008 11/8/2008 Joe 11/8/2008 11/22/2008 Joe 11/22/2008 11/29/2008 Joe 12/10/2008 12/17/2008 Joe 12/17/2008 12/24/2008 Now that I have this dataset I would like to only include Arrival Dates that begin on a day within a 6 day range. ...

Data from Access query to Excel
To pull data from an Access 2003 database, I have created the queries in Access, then import into Excel. The problem is that all the numbers that are pulled into Excel are text and need to convert them into numbers to run formulas on. I have converted a few sheets by hand, but, some have will over 50,000 rows. Is there a function to select all number colums (the colums are the same through out the sheets) and convert? Thanks There are instructions here for converting text to numbers: http://www.contextures.com/xlDataEntry03.html You can select all the columns, and only the num...

Createing Quote sometimes make Error: 80070057
Hello NG, Today I found some funny problems. I create Quotes via the quote WebService from the CRM. This normally works fine, but now I have some quotes, which will get me an error, when I open it. This error is no normal error, I will get an white/yellow Page with ASPX Errorpage: Here the Message (sorry but I only have this error in German): Serverfehler in der Anwendung '/'. ---------------------------------------------------------------------------- ---- Falscher Parameter. Beschreibung: Beim Ausf�hren der aktuellen Webanforderung ist ein unverarbeiteter Fehler aufgetret...

Please help with last formula for order form.
I am able to accomplish this with 1 column by the formulas below. Cell H160 is the subtotal: =IF(SUM(H72:H111)>0,SUM(H72:H111),"") Cell H166 the total: =IF(SUM(H160)>0,SUM((H160*H163)+H160),"") Cell H163 is for Tax. I am almost finished creating an order form. I would like to get the SUM of 3 different columns that are separated. I am not able auto fill strait down the column, because the information is separated in groups with titles, and the cells are not identically sized. I tried varations of this formula: =IF(SUM(H72:H111)+(116:131)+(135:154)>0,SUM ((H72:H...

List box with available queries question
I have a list box control on a form and want the list box to display all the queries within the database. The following code is what I have so far but it does not work. Any help is appreciated. SELECT [Name] FROM MSysObjects WHERE [TYPE] = 5 and LEFT([Name],1) <> "-" ORDER BY [Name]; "Billy B" <BillyB@discussions.microsoft.com> wrote in message news:F47BB77B-7B66-4860-8954-F4FE32FE7C3C@microsoft.com... >I have a list box control on a form and want the list box to display all >the > queries within the database. The following code is what...

Creating Control Grid
Hi all, I would like to know as to how I should go about creating a control grid of my very own. I just need a bit of push (suggestions). Thanks In Advance Where are you getting stuck? Of course, if the grid isn't too large and most of the cells will have data, then you could simply use a two-dimensional array. For larger grids that will be sparsley populated, there are a couple of algorithms to consider. A simple one is to create a one-dimensional array that represents the rows (or columns), and have each item contain or reference a linked list for all items in that row (complete...

can't find form
i have a command button on a form [frmMainMenu] that when clicked, closes that form and opens another [frmFixtureSchedulePrintOptions]. The 2 share the same table as a record source, so i'm doing this to avoid conflicting updates the code behind [frmMainMenu] reads like this (below), and functions correctly DoCmd.Close stDocName = "frmFixtureSchedulePrintOptions" DoCmd.OpenForm stDocName, acNormal on the new form [frmFixtureSchedulePrintOptions], there is a command button to save to close itself, and open the previous from [frmMainMenu], and the ...

Help with queries
Hi Guys, This is the first time after school that I am trying to use ms access at work and i need ur help in creating a query. Any help will be highly appreciated!! Here is what I need... I have relatively small ms acces database with about 1000 I have 3 colums date ipaddress sitename 12/09 34.3.3.3 A 12/09 34.3.3.3 A 12/09 34.3.3.3 A 12/09 33.4.4.4 B 12/09 33.4.4.55 C What i need is if an ipadress is recorded more t...

SFO without joined to MSCRM domain (continue) for Mr.John
Dear Mr.John, Please tell me, Why SFO can not use RPC over Http? because I must to explain with my customer. Do you have any idea for using SFO with MSCRM behind firewall and client are using SFO had multi domain in their company? rpc over http is used to coomunicate with exchange server. -- John O'Donnell Microsoft CRM MVP http://www.mscrmfaq.us "phong" <phong@discussions.microsoft.com> wrote in message news:8FB1B72F-6021-4D50-B71D-F92433CD44B8@microsoft.com... > Dear Mr.John, > Please tell me, Why SFO can not use RPC over Http? because I must to &...

Form Summarys
I want to know if i can write up my form on excel and then on anothe sheet it summarizes it so i have a log of all the forms i send out bu each time i create a new form can it create a new summary underneat the old one ?? Many Thanks:D Ben -- Message posted from http://www.ExcelForum.com Does this mean that you have certain cells that you want to track? If yes, then you could run a macro when you're done with the form: Option Explicit Option Base 0 Sub testme01() Dim myCellAddresses As Variant Dim FormWks As Worksheet Dim LogWks As Worksheet Dim nextRow As Long D...

Getting an UnBound control value into a Table field??????
I have a form that calculates a production rate in "parts per hour". This form needs to be able to differentiate between Line work, Cutter work, Side work, and Blister work. I created a drop down list for selecting the "Study Type" as listed above. I then created a text box for each "study type". When I select the "study type" each text box checks to see if the selection applies to it and makes the calculation if it does apply. The code for the "Line" study is as follows: =IIf([StudyType]="Line",2700?/[SecondsPerPart])...

eConnect or Web Servies to create RMTransaciton?
Hello, I am new to GP 9.0 development using web services and eConnect. Can someone help me decide which technique I can use to do the following: In GP 9.0, if I go to: Transactions-->Sales-->Transaction Entry brings up the Receivables Transaction Entry screen, where I can fill in a number, batchid, customerid, and some sales figures, etc. I am using .NET and can use the eConnect API to create a taRMTransaction to submit using eConnect. And it works fine, the transaction creates in GP. Can I perform the same thing with any of the web methods available via the GP 9 web services? I ca...

Pass infomration from a form to a report...
I have a form that displays a certain fields from a specific record. How can the selected values be passed to create a report? From my understanding reports can only get information from tables and queries. How can I query th information from a form? Thank you for any help, George On Fri, 26 Mar 2010 12:13:31 -0400, George <MyEmail@FakeEmailAddress.com> wrote: >I have a form that displays a certain fields from a specific record. How > can the selected values be passed to create a report? > From my understanding reports can only get information from ta...

Suggestions on how to create a database that will allow lookup of nonunique addresses for unique names
Hello: I am relatively new to access, though vaguely familiar with database concepts and Access jargon (i.e., queries). I need to do the following (see below) and I was hoping someone could tell me what is the best way (at a high level) to do this in Access. I have a large list of names and addresses thrown into a single flat table. There are many duplicates in the file. Somehow, I need to separate duplicate addresses from the file and place them in another table so that I can link the list of unique names to the addresses (i.e., a one to many relationship). My end users will be using the d...