Search results

  1. MattS

    Outlook And HTMLBody

    Well, for those that are interested the HTML for this turned out to be pretty straight forward: <b> </b> Bold text <u> </u> Underlined text <br> Line break The following code creates and displays an email like the example given above: Public Sub sTestEmail() Dim outApp As...
  2. MattS

    subform recordsource change

    I'm guessing it's because you are not referencing the forms collection properly? I do this in a couple of my db's, and I'm sure it is something along the lines of: Forms!Frm_Frames!Frame_2.Form.RecordSource = StrRecSource HTH.
  3. MattS

    Identify report creator from three different locations?

    Sun?? Nope - been pretty much grey all day! Just had a thought - rather than hard coding the reports why not hold a location table in each front end. If you're going to want this information on more than one report it would be better to store it in a table. That way at least, the only...
  4. MattS

    Identify report creator from three different locations?

    :confused: :confused: :confused: Well, if you can't access the logons, the only other way I can think of would be to have either a combo or list box on a form, asking the user to choose which location they were in. You could then reference this on the report. Of course, this would be open to...
  5. MattS

    Identify report creator from three different locations?

    You could print the users windows logon ID on the report, to identify who produced it or, if you really want the location, have a table with the users and where they are, and look it up using the ID. If you need info on getting the user id see this post: Windows Logon Thread HTH, Matt.
  6. MattS

    Outlook And HTMLBody

    I want to include some fairly basic formatting (bold and underlined text) within an e-mail. Having searched through various posts here, it seems I have to use the .HTMLBody property. The problem with this it that you have to have some idea of HTML (which I don't!). If somebody could give me a...
  7. MattS

    Kick Users

    The only thing missing is some kind of warning to the users. I checked my code, and I use the Tag property to tell if I've issued a warning or not. It's not essential, but from my experience users aren't too happy being kicked out without any forewarning!!:D
  8. MattS

    Kick Users

    I do something very similar. I don't have the code to hand right now (and can't rememer it!), but check out http://www.rogersaccesslibrary.com. This is where I originally got it from.
  9. MattS

    If all rows in a query = true

    I included the apostrophes because you were using a string variable (actionplanid). Looking back at the code (and the reason for the data type errors) is that the field [Action Plan ID] appears to be numeric. To get the previous code I posted to work, change the variable actionplanid to be an...
  10. MattS

    If all rows in a query = true

    Based on the code in one of your previous posts I'm guessing the problem is caused by not using apostrophes/quotation marks to include the string variable. Try: Dim var1 As String Dim var2 As String Dim actionplanid As String actionplanid = 26 var1 = DCount("[Action Plan ID]"...
  11. MattS

    Show form modal???

    Regardless of the value of MyAnswer you are setting the forms visible property to false. That is why it just flashes on the screen and dissapears.
  12. MattS

    Simple: access form properties

    Two ways to get to a forms properties: 1) goto the top left hand corner of a form, and there's a little grey box - double click here. 2) goto the object selection drop-down menu and choose form - then goto properties Project explorer is under the view menu - in the VBA code window. Matt.
  13. MattS

    Error Trapping (Mile-O)

    Mile-O, Saw your response to one of ColinEssex' posts, and your comments regarding an error trapping subroutine to write all of the details to a table. I'm fine to create the code to do it, but was wondering how you dealt with subroutines and functions that are called from many places. i.e...
  14. MattS

    Help creating a report

    What you want to achive is entirely possible using sorting/grouping and headers/footers within the report. The attached db is very basic, but I think does what you want. HTH, Matt.
  15. MattS

    sending data to table via form

    Firstly, and this is only my personal opinion, you should ALWAYS have OPTION EXPLICIT in your code, just beneath the OPTION COMPARE DATABASE. This means that you have to explicitly decalre any variables you use. Without it, Access just assumes that any you haven't declared are a variant...
  16. MattS

    Can you send users a message at will?

    I was trying to do something very similar, and ended up using the Shell command in VBA. The following post here should help. Matt.
  17. MattS

    Help creating a report

    Sounds like you need to add some sorting/grouping in your report. If you sort it by StudentID then AttDate, add a footer for StudentID. Go to the properties for the new StudentID footer, and set Force New Page = After Section. This should force a page break at each change in StudentID.
  18. MattS

    How would you do this

    Do you mean delete everything in the table before adding your new records? If so, simply add the following before the .OpenQuery line in the code: .RunSQL "Delete * From tblYourTable" Regarding adding the records, if it's not adding all of them then there's probably some kind of validation or...
  19. MattS

    Find Gated Dates In Table

    Chris, This is an amended version of something I use to check overlapping dates. I created a test table (tblRules) and it seems to work. Wasn't sure if you neede to check overlapping times for a location or a member of staff, so this checks both. Hope it helps, Matt. Public Sub...
  20. MattS

    Make Access The Active Window

    Using the Shell command works perfectly.:D Thanks for all your help. Matt.
Back
Top Bottom