Search results

  1. T

    Update query

    Thanks, I'll give it a shot.
  2. T

    Update query

    I am importing data from Excel formatted like this: Product 4/1/2008 5/1/2008 6/1/2008 7/1/2008 8/1/2008 8500 3200 500 2500 1050 3000 My table in Access is formatted like this: product monthdate volume 8500 4/1/2008 3200 8500 5/1/2008 500...
  3. T

    Combine queries

    That's what I meant, sorry I wasn't clear on that. I do want to create all of the queries within the module, just wasn't sure if it was doable or even made sense. Thanks!
  4. T

    Combine queries

    Wondering if this is possible. I'm trying to clean-up my db and have about 8 separate SELECT queries that I am running from a macro and exporting to Excel. Can I create a module with all of these queries so I can delete the 8 separate ones? Thanks
  5. T

    Search by autonumber id

    Thanks so much, works perfectly!!! Private Sub Command3_Click() If DCount("[projectid]", "tblProjectDetails", "[projectid]=" & Me!projectid) > 0 Then strWhere = " (tblProjectDetails.projectid) = " & Me.projectid DoCmd.OpenForm "Projects", , , strWhere Else MsgBox "Item doesn't exist" End If...
  6. T

    Search by autonumber id

    Thanks for the quick responses. Is the DCount going to take care of the user entering an incorrect projectid#? It looks like it's just going to look for a number in the field (>0) but perhaps I am reading it incorrectly. Thanks!
  7. T

    Search by autonumber id

    I have the following code attached to a submit button on my form with just one unbound field "projectid". I need to add an error message when the projectid entered does not exist in the database. What I have tried is not working so far and would appreciate some help with the code. Private Sub...
  8. T

    Distinct count

    The grouping by "codename" is what Access did automatically from the query grid and that is working fine. I'm trying to eliminate duplicate part numbers from the query. I think I am going to need to create a new table using "DISTINCT" to eliminate duplicate part numbers within each "codename"...
  9. T

    Distinct count

    Tried several suggestions in the forum but haven't found one to match my needs. I have one table, Jupiter and need to use this query SELECT Jupiter.codename AS Build, Count(Jupiter.tooling_ind) AS [# Needing Tool], Count(IIf([tool_req_type]='OR',([requisition_no]))) AS [# Tooled], [#...
  10. T

    Null field

    Need some help with this one: I have a "build a query form" with five listboxes. The last one is a list of suppliers. I have the code set to pull the records for only the supplier that is selected or, if nothing is selected, pull all of the records. The problem is that some records do not...
  11. T

    Delete problem

    I have a form with a combo box with the recordsource of: SELECT [SubType].[SubTypeID], [SubType].[SubType] FROM SubType; I have a delete record button: Private Sub delete_Click() Dim strInput As String Dim strMsg As String DoCmd.SetWarnings False Beep strMsg = "This action...
  12. T

    Sum multiple columns and IIf

    I have a table with the following fields: planned_volume, actual_volume and monthdate. I need to come up with a query that will sum the volumes based on monthdate, like: (fieldname)1/1/2007 - If monthdate = 1/1/2007 then SUM "planned_volume" where "monthdate" betweeen 1/1/2007 And...
  13. T

    Find like data between tables

    This may have already been addressed, but I can't even think of how to word it to do a good search. I have one table, tblInvoices. I've done a query to search for "Micro*" in my [supplier] field, along with [Item]. I then need to pull from the same tblInvoices, any other records that...
  14. T

    Error messages

    Thanks for the explanation, that makes sense to me now. I knew when it happened, just not why, now I know:)
  15. T

    Error messages

    Figured it out, I think. I had created an AfterUpdate event on a control, then changed it in the VBA window to BeforeUpdate. I think that confused it and I ended up having to delete the control, remove the datasource from the entire form, save it and add the data source again. Then...
  16. T

    Error messages

    I was working in my database and suddenly started getting this message on every button I clicked and on advancing records in my form: "The expression "On Click" or "On Current" or "On Load", etc. you entered as the event property setting produced the following error: Procedure declaration does...
  17. T

    DSum and Between

    Thank you so much!!! Got it! Me.prodvolume = DSum("[volume]", "qryMonthlyEngineVolumes", "[product] = '" & Forms!Projects!product & "'" & " And [monthdate] Between " & "#" & Forms!Projects!txtCutInDate & "#" & " And " & "#" & Forms!Projects!txtEndDate & "#")
  18. T

    DSum and Between

    Thanks for the reply however, I'm not understanding your suggestion. First, the code works as I described without # around the dates and, second, how do I put #'s around the txtcutindate and txtenddate fields? It gives me an error. Also, forgot to mention a couple of things. The "Supplies...
  19. T

    DSum and Between

    Could someone please point out what could be wrong with this code? I have a form with txtCutInDate and txtEndDate. I am trying to do a DSum from a query to calculate a volume based on between the two dates and place that volume in the [prodvolume] field, i.e. if my cut in date is 5/1/2007 I...
  20. T

    DatePart and Between...And

    Thanks Brian, that took a step out of my monthly calculation query. The 2nd part of my problem is how to get it to show in the query only the months from cutindate to enddate instead of 12 months. What I was trying to do in the Between..And was to take the cutindate and add to it from...
Top Bottom