User Profile

Collapse

Profile Sidebar

Collapse
Monroeski
Monroeski
Last Activity: Oct 30 '09, 07:05 PM
Joined: Aug 30 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Monroeski
    replied to DAO Recordset Problem
    Ultimately got it working using this -

    Code:
    strSQL = "SELECT tbl_PolicyList.Service, tbl_PolicyList.PolicyNumber, tbl_PolicyList.Title, [DateRevised]+1095 AS TestField, [DateRevised]+1095-Date() AS DateDue, tbl_Contacts.FirstContact, tbl_Contacts.SecondContact " & _
        "FROM tbl_Contacts INNER JOIN tbl_PolicyList ON tbl_Contacts.Service = tbl_PolicyList.Service " & _
        "WHERE ([DateRevised]
    ...
    See more | Go to post

    Leave a comment:


  • Monroeski
    replied to DAO Recordset Problem
    Still didn't work.

    I tried simplifying down and isolating different parts of the query, and now even this is giving me a type mismatch error -

    Code:
    Set rstEmail = "SELECT tbl_PolicyList.Service, tbl_PolicyList.ServiceChief, tbl_PolicyList.PolicyNumber, tbl_PolicyList.Title, tbl_PolicyList.DateIssued, tbl_PolicyList.DateRevised, tbl_PolicyList.PolicyReviewer FROM tbl_PolicyList ORDER BY tbl_PolicyList.Service;&quo
    ...
    See more | Go to post

    Leave a comment:


  • Monroeski
    replied to DAO Recordset Problem
    Whenever I hit the button to run the code, I get a type mismatch error, and when I hit debug it always highlights the last ampersand in this code -

    Code:
    'Set rstEmail = "SELECT tbl_PolicyList.Service, tbl_PolicyList.PolicyNumber, tbl_PolicyList.Title, [DateRevised]+1095 AS TestField, [DateRevised]+1095-Date() AS DateDue, tbl_Contacts.FirstContact, tbl_Contacts.SecondContact " & _
        "FROM tbl_Contacts INNER JOIN
    ...
    See more | Go to post

    Leave a comment:


  • Monroeski
    replied to DAO Recordset Problem
    Didn't work, but I think I may have figured it out. The query itself has references to controls on a specific form. Edited that out, but I'm running into another problem with type mismatches that I'm assuming is related to the fact that the query is adding and subtracting a date field.

    Code:
    [DateRevised] + 1095 - Date
    ...works fine in Access, but I'm assuming VBA has a problem with it even if it is just pulling it from...
    See more | Go to post

    Leave a comment:


  • Monroeski
    started a topic DAO Recordset Problem

    DAO Recordset Problem

    I'm trying to populate a recordset with a query I have stored in Access 07. I basically copied the lines from the help file on how to do this but substituted my own info -

    Code:
    Dim dbsCurrent As DAO.Database
    Dim rstEmail As DAO.Recordset
    Dim strService As String
    
    
    Set dbsCurrent = CurrentDb
    Set rstEmail = dbsCurrent.OpenRecordset("qry_EmailList")
    But every time I try this,...
    See more | Go to post

  • Monroeski
    started a topic Generating an email in Infopath
    in XML

    Generating an email in Infopath

    Not sure if this is really the right place to post this question, but it seemed like the best place available given the options.

    Is there any way to create a button in Infopath that generates an email (similar to docmd.sendobjec t in Access)? Ideally, I would like to find a way to get a button to just automatically call File -> Send Form as Attachment, though it would be nice to have just a regular function for future use.
    See more | Go to post

  • Monroeski
    replied to Basic ASP.Net database interaction question
    in .NET
    So, basically, ensuring integrity of data if more than one person is in there is either impossible or would require a bunch of complex code of some sort?...
    See more | Go to post

    Leave a comment:


  • Monroeski
    started a topic Basic ASP.Net database interaction question
    in .NET

    Basic ASP.Net database interaction question

    We have an MS Access database that we are using at my work. Currently, everything is done through forms in Access, but this makes making any updates to the forms difficult, as there is always somebody in the file so we can never save any changes. The plan is to make the forms web based. We're currently looking at a few different options - the first is to use Infopath, which a coworker is learning right now, while the other is to use ASP.Net. ...
    See more | Go to post

  • Monroeski
    started a topic Referential Integrity and Linked Tables

    Referential Integrity and Linked Tables

    We are working on putting together a network of Access DBs for a few projects at work. Our plan was to have a "Master" DB with, for instance, a table that has a list of departments and their passwords, then have all our other DBs link to that table so that any changes in the Master table will automatically update across all the rest. The problem with this strategy, we just realized, is that when you try to set up a relationship between...
    See more | Go to post

  • Monroeski
    replied to SQL resolution order question
    Nevermind, we figured it out, but I thought it would be a good idea to post the answer up here.

    Basically, in "Question1" , it is returning a True or False when deciding if the field is equal to pain or not. So, it isn't finding the max of the 0s and 1s, it is finding the max of Trues and Falses. So, both questions are evaluating the Max of the initial table fields, not alternating between the table fields and the results...
    See more | Go to post

    Leave a comment:


  • Monroeski
    started a topic SQL resolution order question

    SQL resolution order question

    I've been using SQL for a while now, but nothing too detailed, so I signed up for an SQL class at work. A question I had about a certain query, though, has brought everything to a screeching halt while we search for an answer. Here's the code -

    Code:
    select vitaldate, ptien, locien, dssid,
    
    1 as vitalpanel,
    
    Question1 = max(case when type = 'pain' then 1 else 0 end),
    
    Question2 = max(case
    ...
    See more | Go to post

  • Got it, thanks. I actually figured out a somewhat ridiculous workaround, but your way is better.

    And I didn't mention about the SendObject method because I already had that part figured out. ; )
    See more | Go to post

    Leave a comment:


  • That worked, thanks for the help.
    See more | Go to post

    Leave a comment:


  • Monroeski
    started a topic Quick Question about query with no results

    Quick Question about query with no results

    I have a form that is based on a query that pulls names according to an input ID. If the ID is invalid, the query obviously returns no results. If this is the case, I want to make an error message visible, but I can't figure out how to determine this in the VBA code. Basically, it looks something like this -

    Code:
    If Me.Name = Null Then
            Me.TextBox1.visible = false
            Me.TextBox22.visible = True
    ...
    See more | Go to post

  • Pulling email addresses from a DB, then sending the email

    I am working on a form for approval/disapproval of requests. Basically, the user will select a RequestID from a combobox, then select approve or disapprove, then hit the submit button. When they hit submit, I want to

    1. Update the DB (which I have already implemented), then
    2. using the RequestID, determine the two related email addresses (let's say Email1 and Email2) attached to the relevant ServiceID.

    This...
    See more | Go to post

  • Nevermind, found the answer in a different thread. Used bad search criteria when I looked earlier before starting my own. Sorry about that.
    See more | Go to post

    Leave a comment:


  • Help on generating a number based on the max of a field

    I'm working on an Access 2003 database where users can submit requests for personnel. For a number of complicated reasons, the best primary key to use is going to be an autonumber (or, really, just a number). Basically, what I want to do is this -

    when a user types in all the info for their request, it is sitting in unbound textboxes. I then use VBA code to create the SQL query and insert the record. What I need is a way to also...
    See more | Go to post

  • Monroeski
    replied to Quick question about Count expression
    Got it working. I knew how to do it in code, but this is a REALLY simple little project, so I wanted to just do it right there on the form. Thanks to a few other little nuances, it would have been a lot of extra work to do this stuff in code. Plus, I just wanted to know how to do it for future reference.

    If anyone cares, I was also using the count to calculate a percentage, and the expression I put as the control source ended up...
    See more | Go to post

    Leave a comment:


  • Monroeski
    started a topic Quick question about Count expression

    Quick question about Count expression

    I tried doing a search for this, but I think the terms I need to use are too generic to come up with anything useful.

    Basically, I have a yes/no field in a query that is the record source for a sub form. I am trying to get one text box to show the number of Yes', and another one to show the number of No's.

    On the Text Box's control source, I assumed that since you can type "=Count([FieldName])" to get a regular...
    See more | Go to post

  • When I had to change the color of a field in individual lines in a continuous form, I just right-clicked on the text box, selected "conditiona l formatting," and worked out an expression that way.

    I generally like to put as much stuff in the code as possible, and stay away from letting Access do stuff like that for me because inevitably it also automatically "helps" me do something I didn't want to do, but I kept...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...