Page 3 of 4 FirstFirst 1234 LastLast
Results 31 to 45 of 53
  1. #31
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169

    left the attachment off the previous message.

  2. #32
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    any ideas June?

  3. #33
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Might give the memo datatype a try. Otherwise, concatenate multiple textboxes into the body.

    .HTMLBody = Me.Text63 & Me.Text65 & Me.Text67 & Me.Combo71 & Me.Mess_Text

    The issue with this could be run-on text (lack of spaces). Might need:

    .HTMLBody = Me.Text63 & " " & Me.Text65 & " " & Me.Text67 & " " & Me.Combo71 & " " & Me.Mess_Text
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #34
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Hello again,

    I now have the need to do what the title of this thread indicates again. It just so happens when I initially posted I found a better solution to accomplish what I needed done. However, now I want to make a button appear based on a selection from a combo box. Here is the code Im currently using for the Afterupdate event:

    Private Sub Combo55_AfterUpdate()
    If Me.Combo55 = "Brandon, MB" Or Me.Combo55 = "Linwood, MB" Then
    Me.Command105.Visible = True
    Else
    'nothing
    End If
    End Sub

    I do not get any errors with this code but it doesnt do anything at all. My combo works just the same. Im trying to make a button apear to the side of the combo box only when the conditions above are true. I have set the "visible" properties to "no" as the default value. Any other ideas?

  5. #35
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What is the RowSource of the combobox? Is it a multi-column? Show the SQL statement.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #36
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Yes and I thought right after posting that that may be the issue.

    Is this what you needed? SELECT Dispatch.ID, Dispatch.Site, Dispatch.To, Dispatch.CC, Dispatch.Address FROM Dispatch ORDER BY Dispatch.[Site];

    item in bold is the only column used in the drop down.

  7. #37
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So this combobox is set up as multi-column?
    Property settings of?
    NumberColumns: 5
    BoundColumn: 1
    ColumnWidths: 0";1";0";0";0"

    If so, then the actual value of the combobox is the ID, not Site. Use the ID as criteria in the code. What would be the ID for "Brandon, MB" or "Lindon, MB"?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #38
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    Once again you have SOLVED my issue. Thanks soooo much June7!!

  9. #39
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    One last thing....

    Although the button appears now when certain selections are selected from the drop down, it doesnt dissappear when I select another selection. Is there something else I need to add to the if/else statement?

  10. #40
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Yes, try instead of 'nothing, put Me.Command105.Visible = False
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  11. #41
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    duh...thanks again. : )

  12. #42
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    One more question on this form I created. Im looking to make certain fields 'mandatory' to where if you try to submit the form or click off the form, it will notify you of the requirement. Seems to be associated with a 'lostfocus' event but im not sure on the coding.

  13. #43
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    You can set the field as Required in the table. Access will nag the user to provide data.

    Can put code in some event to check the value of those fields. What do you mean by 'submit', a command button? In these situations I will disable the X close button so users can only close the form with my custom button. I will often but code to check the fields behind this button.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  14. #44
    tobydobo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Sep 2011
    Posts
    169
    This particular form is the form you assisted me with in this thread. Its an email template form....the submit button is the Send button actually. The fields I need to make required are unbound fields as it is only used for user input into which is then inserted in to the email that is generated.

  15. #45
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Then put code in the Send button, like:

    If IsNull(textbox1) Or IsNull(textbox2) Or ... Then
    MsgBox "Must enter values in 1, 2, ..."
    Else
    'send email
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Page 3 of 4 FirstFirst 1234 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Combo Box values based on preceding selection
    By speckytwat in forum Access
    Replies: 11
    Last Post: 04-27-2011, 11:35 AM
  2. Replies: 4
    Last Post: 01-24-2011, 07:11 PM
  3. Visibility based on Combo selection
    By jlclark4 in forum Forms
    Replies: 1
    Last Post: 12-22-2010, 11:42 AM
  4. Replies: 2
    Last Post: 09-17-2010, 09:53 AM
  5. Replies: 1
    Last Post: 08-26-2009, 10:45 AM

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