Results 1 to 6 of 6
  1. #1
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085

    Command Button on DataSheet Form


    I have an Access 2010 Database. On one of the forms it displays Events that my company has scheduled. This is done on a datasheet form. I need to add a command button to the form the button is used to open a form so the user can put in the subject and detail of an email and there is also the ability to add attachments to the email and send it to all customers that have email addresses listed in the database. the problem is that on the Datasheet form the command button doesn't show up. It does on the continuous forms but the user and I prefer the look of the datasheet. Is this a possibility or do we have to use the continuous forms?

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Make it a subform instead.

  3. #3
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Sorry aytee111 I have no idea what you mean. There's no reason for it to be a subform. It is called from a subform that we use to schedule events that we put on

    For Example

    Event EventDate Attendees Leads
    Coffee Club 01/15/2017 35 3
    Coffee Club 01/22/2017 36 2
    Coffee Club 01/29/2017 31 1
    Coffee Club 02/05/2017
    Coffee Club 02/12/2017

    At the end of each line of data is a command button that is for sending invitations to this event
    When the command button is pressed a form opens up for the user to enter the subject line of the email and the detail information there is also a button to attach documents related to the event. There is also a command button that runs a query getting the email addresses in our DB for the type of member the event is directed at. The Code then loops through that recordset and send's an email to each person. My problem is that the command button on the subform doesn't appear if the subform is a datasheet.

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    My problem is that the command button on the subform doesn't appear if the subform is a datasheet
    Correct. However, if you make the datasheet form a subform to another (sub)form, you can then put command buttons, etc. on the main (sub)form. It will be transparent to the user.

    The Events form will then become two forms - a new form with buttons, etc, and a form with the current Events form brought in as a subform. Hope I'm not confusing you!

    (Here are some actions:
    1 - rename current Events form to xxxx_subfrm
    2 - create new blank form
    3 - in design view add current Events form (1) as subform control
    4 - save this form as original name from (1)
    You don't have to make any other changes. Now when the form is opened it will contain the datasheet as well as a place to add buttons)

  5. #5
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I think you need a split form. If you had an unbound checkbox field in your continuous form you could multi-select and send several emails based on those checks. Do you have a way of knowing which of these records were already emailed to?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    RayMilhon is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Micron, No the emails would go out in a batch one time there was no need track who received the emails. However, I may go ahead and add that as an enhancement later on. Thanks for the idea. aytee111, I get what you're saying now, but I ended up redesigning the form as a continuous form and it looks and works they way I need it too. Just had to move things around a little and make the form design look like a datasheet. Not exactly how I envisioned it but it works and the users like it. Thanks for the suggestion. I've added that as a possible future enhancement if it becomes necessary.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 01-07-2016, 10:29 AM
  2. Replies: 8
    Last Post: 06-25-2014, 08:03 AM
  3. Replies: 3
    Last Post: 08-04-2013, 07:11 AM
  4. How To Add Button on Datasheet View form
    By OneToLearn in forum Forms
    Replies: 3
    Last Post: 04-11-2013, 02:18 PM
  5. Replies: 1
    Last Post: 07-27-2010, 02:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums