Results 1 to 8 of 8
  1. #1
    quinnb is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    9

    4 bits of help please


    Hi i am designing a database for reminders - a car has a service - 11 months later a reminder letter/email/text gets sent to the customer
    Q1 - i have had to use two lines for the address though in 99/100 one line would do so when i create a report for the letter there is a big gap in the address - how do i get rid of this gap whist keeping the field in the report

    Q2 - i have a prefernce control group - so 4 options email, letter, text, all 3. How do i based on this grey out cells i dont need - i,e select email address field greyed out etc

    Q3 How can this be automated so every day say at 11am the database automatically sends the letters to the printer, email, text etc etc what i would like it to do is print the letters then save 2 CSVs one for mail chimp and one for the texts,

    Q4 if i specify in my control that email is preference then the cell is un-greyed see above - how can i then make sure an email is entered, same for address etc

    Q5 When entering the date of the service it isnt greater than today?
    Thanks Brian

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Q1 - expression in textbox to concatenate two fields with Chr(13) and Chr(10) to force carriage return. Use IIf() function and or + character for concatenation, example:

    =[Field1] & Chr(13) + Chr(10) + [Field1]

    Q2 - don't understand, grey out field where? A textbox on form?

    Q3 - a VBScript file can be called by Windows Task Manager. The script file can run procedure in Access db, review https://stackoverflow.com/questions/...ernal-vbscript

    Q4 - use VBA code to validate entries, use If Then Else structure

    Q5 - can use Validation Rule property or again, VBA code
    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.

  3. #3
    quinnb is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    9
    thanks for this but can you make it more specific please?
    Q1 - My fields are ADD1 and ADD2 - where exactly do i enter the code - and whAT is the exact criteria pls
    Q2 - greyed out should read cell disabed/enabled based on the criteria from my options group
    Q4 sorry what is the code? / validation text and Q5

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Q1 - I said expression in textbox and then I provided an example without criteria, try it: =[Field1] & Chr(13) + Chr(10) + [Field1]

    Q2 - explore Conditional Formatting of textbox and combobox https://support.office.com/en-us/art...5-44E43B05E22F

    Q4 - this could get a bit complicated and more than one way to structure the code which depends on what you want to happen, something like:
    Code:
    Sub someButton_Click()
    Dim strMsg As String
    Select Case Opt1
        Case 1
            If IsNull(Me.Field1) Then
                strMsg = "Email"
            Else
                'code to send email
            End If
        Case 2
            If IsNull(Me.Field2) Then
                strMsg = "Address"
            Else
                'code to print letter
            End If
        Case 3
            If IsNull(Me.Field3) Then
                strMsg = "Phone"
            Else
                'code to do something else
            End If
    End Select
    If strMsg <> "" Then
        MsgBox "Enter " & strMsg
    End If
    modify as appropriate for your situation

    Q5 - Validation Rule property like: <= Date() Or Is Null
    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.

  5. #5
    quinnb is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    9
    #Type! is what is displaying on the report? have entered =[add1] & Chr(13) + Chr(10) + [add2] on to ADD1 text box control?

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    What is name of the textbox? If it is ADD1 then this is same name as field add1 and causes circular reference error. Rename the textbox to something like tbxAdd.
    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.

  7. #7
    quinnb is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2017
    Posts
    9
    Quote Originally Posted by June7 View Post
    What is name of the textbox? If it is ADD1 then this is same name as field add1 and causes circular reference error. Rename the textbox to something like tbxAdd.
    Ok i have done this and all it does is put the first line of the address on both fields - so 123 somewhere street appears add1 which it should but also line two as well

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Don't understand. Show sample data.
    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.

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

Similar Threads

  1. Replies: 7
    Last Post: 09-07-2016, 08:29 AM
  2. break a string into smaller bits
    By jmss96 in forum Queries
    Replies: 3
    Last Post: 12-18-2014, 11:57 AM
  3. Massive Data Bits Against Timeline of Events
    By Armorica in forum Database Design
    Replies: 1
    Last Post: 05-24-2013, 07:07 AM
  4. Replies: 2
    Last Post: 10-19-2012, 02:21 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