Results 1 to 13 of 13

Thread: auto email

  1. #1
    Join Date
    Jan 2007
    Posts
    8

    Unanswered: auto email

    I am new to this site, and hope to find it useful, I am only a beginner developer, have little to no VB knowledge as yet, however have designed in my opinion site good Databases, however the more I seem to do, the more people want, and I find miyself going into uncharted seas.

    SUMMARY
    I need a database that can do the following, how would I go about this, I have enclosed a flowchart to explain what I am basically looking at, it needs to be simple and to the point.

    Using ACCESS 2000
    Multiple Users
    The Primary Key will be a Run/Job number (searchable, select from list)
    Each departments needs to input comments against a run/job number (text)
    Each comments then needs to be automatically emailed to specified personnel via email, with the option of attaching files.
    Search screen
    View each run/job, in 'date entered comment' order via report.

    Any ideas, I do get there in the end through painstaking self teaching, but thought, somebody may have far more knowledge and wht better way to learn than tap into unlimited internet resources.




    Is it possible to automatically email a list of people when I new records is entered.
    Attached Files Attached Files

  2. #2
    Join Date
    May 2005
    Posts
    1,191
    Hello simon4amiee and welcome to the forum.

    I was in your same shoes a couple of years ago (and still am to some extent). This is where I came for knowledge, and I wasn't disappointed, hope it's the same for you.

    Multiple Users
    First off, I'd recommend using a front-end / back-end setup style (you may have to research this a little more). This may also require you to learn some VB. It's pretty user-friendly programming as far as programming codes go, and if you have any background in programming it's fairly easy to pick up with help from the guys on this forum.

    The Primary Key will be a Run/Job number (searchable, select from list)
    This is all in how you set up your table. You can choose to sequentially autonumber (this will require a dlookup most likely) or just have the user enter it.

    Each departments needs to input comments against a run/job number (text)
    This can be done via any number of forms you build.

    Each comments then needs to be automatically emailed to specified personnel via email, with the option of attaching files.
    This can be accomplished in VB using the docmd.sendobject action in any event (clicking a button for example). You may want to create a table with user info (First Name, Last Name, email...) and reference this.

    Search screen
    This is a bit trickier, but I have created decent search forms using a form with fields that are then used in an SQL search, which is kicked out to a report.

    View each run/job, in 'date entered comment' order via report.
    I think what you're asking here can be done just by building a proper report.

    Feel free to ask more questions. I'm not the wisest man here, and I'm sure the rest of the users here can offer far better help than I can. This is just a first effort.
    Me.Geek = True

  3. #3
    Join Date
    Jan 2007
    Posts
    8
    Thanks for that, no Im just starting to learn VBA for ACCESS, and too be fair, I just don't get it, even after reading through a chapter dozens of times, I still cannot and don't know how to do the test at the end of the chapter, its really got me beat, I was going so well up until then, I need to be able to sort this to continue with my MCDBA (Microsoft Certified Database Administrator) but I'm at my wits end, how can you teach someone who just doesn't get it, and it's not as of im stupid either.

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    Do you know where you're getting stuck on, or rather what seems to be ungraspable?

    Else, anyone else want to field this one?
    Me.Geek = True

  5. #5
    Join Date
    Jan 2007
    Posts
    8
    Create a function called Power with 2 integer arguments, the 2nd is optional, the function should raise the first argument to the power of the second, if the second is omitted then raise the first to the power of 2.

    this is the solution, I will write in red the question

    Public Function Power (intNumber As Integer, _ what intNumber
    Optional intPower As Variant) As Long Whats As Long and why

    If IsMissing(intPower) Then dont understand where int comes into it and why
    Power = intNumber ^ 2
    Else
    Power = intNumber ^ intPower
    End If

    end Sub


    I almost get it, but then get confused!

  6. #6
    Join Date
    May 2005
    Posts
    1,191
    Quote Originally Posted by simon4amiee
    Public Function Power (intNumber As Integer, _ what intNumber
    Optional intPower As Variant) As Long Whats As Long and why

    If IsMissing(intPower) Then dont understand where int comes into it and why
    Power = intNumber ^ 2
    Else
    Power = intNumber ^ intPower
    End If

    end Sub
    Normally we don't answer test questions for people, but since you're teaching yourself, I think I'll make an exception this once.

    intNumber is a variable that you call out. It can be whatever you want it to be named (using any of the 26 upper and 26 lower case letters and the underscore _). Typically people use three letters at the beginning to indicate what kind of variable it is (int for an integer, str for a string, etc.). In this case, they have called it out as an integer, and the second variable as long. For a good explanation of what the difference is between the two, put your cursor in the word "Long" and hit the F1 key, it should bring up Microsoft help screen on that word.

    The first line of the if statement (the middle 5 lines) is the boolean check. The code is using the Ismissing built-in function to see if intpower has been specified or not, remember that this is optional. If it is missing, that it raises the first variable to the second power (as specified in your problem). However, if this is not the case (ie, if the second variable is there), then it raises the first to the second (again, per problem statement).

    HTH, ask again if need more. And you can always use the F1 for help.
    Me.Geek = True

  7. #7
    Join Date
    Jan 2007
    Posts
    8
    I cant use F1, I got the PC from the paper, he installed Access 2000 for me, but none of the Help files are there (installed), there isn't somewhere where they can be downloaded is there?

  8. #8
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    As far as my understanding of the differences between Long and Integer are:

    Long (long integers) are signed 32-bit numbers which can take any value between 2,147,483,648 and 2,147,483,647.

    Integer are signed 16-bit numbers which can take any value between -32,768 and 32,767.

    that's probably not the only difference either

  9. #9
    Join Date
    May 2005
    Posts
    1,191
    I don't know of any place you can download it, but you can always look at Microsoft's Website for help.
    Me.Geek = True

  10. #10
    Join Date
    Jan 2007
    Posts
    8
    This is for my work project, 2 fields in a database, a primary key and a text field (comments), upon completion of a text field (comments), can access automatically email a number of recipients those comments entered into the text field, and or include an option to attach a file.

  11. #11
    Join Date
    May 2005
    Posts
    1,191
    How is the user entering the data into the field?
    Is the primary key an autonumber field? If not, how is it entered?
    Who does the email need to go to? The same user every time? Or dependant on what information is entered?
    Me.Geek = True

  12. #12
    Join Date
    Jan 2007
    Posts
    8
    The user will be entering the data via a form.
    The Primary Key is RunJob No (eg A315, A316, A317, H1019, H1020, H1021, 2008 Westwood Development, 2009 Accord Development)
    Email will go to internal staff via Outlook
    Numerous users entering similar info

  13. #13
    Join Date
    May 2005
    Posts
    1,191
    Keep in mind that a database's main function is to store data and display it as information. It sounds like you're trying to use it as a communication tool. So, purely speculatively, you may want to reconsider your use of a database for this task.

    But if you're still commited to it..
    In an event on the form (leaving the field, clicking a button, etc.), use the sendobject action in vb. If you're not familiar with this (as it sounds like), you can simply make a macro from the main window, then run this macro in the event.

    Without doing all of your work for you, this is the best I can do.
    Me.Geek = True

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •