Search results

  1. K

    problem with an application

    I wrote an application that has now been sent to a field office for use. It works fine in our office but the field is having problems with some of the reports. Some work fine but some return an runtime error message 2580. The line that is failing is a docmd.openreport "RptName"...
  2. K

    syntax check?

    Thank you!! The: PIHP_CMHSP_MHP.Value = DLookup("[PIHP-CMHSP-MHP]", "PIHP", "[countycd] = " & Combo2.Value & " and [PFcd] = " & Combo8.Value) worked great!
  3. K

    syntax check?

    The two values in the combo box are numeric. Thanks for the check on that. And there are no null values in my text db. I just have 3 results that should work. I will try your suggestions too. Thanks.
  4. K

    Eporting List's values to excel

    I have used this and it worked well: Access to Xcel DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "exporthist", "c:\exporthist.xls" HTH
  5. K

    syntax check?

    I have the following statement: PIHP_CMHSP_MHP.Value = DLookup("PIHP-CMHSP-MHP", "PIHP", "countycd = " & Combo2.Value & " and PFcd = " & Combo8.Value) The combo2 and combo8 values are both correct but I get an error "Runtime 2001. You canceled the previous operation." when I reach this line...
  6. K

    subreport problems

    I have a report that displays fine when displayed on its own. When I include it with two other reports, as a subreport, the top line is repeated twice. I have tried rebuilding the report, and looking at the data in the table which is fine and listed only once. Any thoughts on how I can...
  7. K

    getting column data

    I have a table with data from many months as follows: Jul-06 Aug-06 Sep-06 .32 .55 .64 .44 .75 .52 .56 .33 .48 I want to place the data from just column Sep-06 in another table. Is there an SQL statement I could write to do something...
  8. K

    runtime error??

    I have the following line of code: CurrentDb.Execute "INSERT INTO ChartTableC (ordernum, program) SELECT (" & kordernum & ", '" & kprogram & "') from trendanalysis" I'm getting a runtime error - syntax error (comma) in query expression. I just don't see the problem. m
  9. K

    call to a macro in a module

    I created a macro (OpenAllrpts) that opens 7 reports. In the argument section I have listed the name of the report and Print preview. In the code behind the form the user will use I have docmd.runmacro OpenAllrpts. I'm getting an error that an argument is needed. What do I do?
  10. K

    declaring global variables

    That was it! I found it dimmed in another module. Thanks so much!
  11. K

    declaring global variables

    I don't have anything else named TheDate. I made the change you suggested from Global to Public but got the same error. It doesn't seem to hang onto the value once I leave the first module and go to the next.
  12. K

    declaring global variables

    I have the following code: Option Compare Database Global theDate As String Public Sub GetDate() theDate = InputBox("Enter Volume Date YYYYMM") mymonth = Right(theDate, 2) then this sub calls another module sub. When that module is opened the global variable theDAte is not recognized...
  13. K

    syntax problem - data type mismatch

    I have no idea why but this worked. CurrentDb.Execute "UPDATE Matchonyyyymm Set FirstDate = 'Y' WHERE MISSN = Cstr(' & fssn & ')" The data type for this field is number but this worked. k
  14. K

    syntax problem - data type mismatch

    If I remove all the quotes like MISSN = fssn then I get the too few parameters error. When the Quotes are in and I check it in the window it has the correct number. I just can't get find the right syntax to get the line to go. Thanks.
  15. K

    syntax problem - data type mismatch

    I tried: CurrentDb.Execute "UPDATE Matchonyyyymm Set FirstDate = 'Y' WHERE MISSN = 'fssn' " no luck. Still data mismatch error.
  16. K

    syntax problem - data type mismatch

    I tried removing the quotes and replacing with #. Error about the #'s. If anyone could tell me or give me the URL of a site with all the various possibilities like formating a string, ' " & string & " ' or number ?? or date, that would be so helpful. k
  17. K

    syntax problem - data type mismatch

    When I took out the WHERE statement the line ran fine so it's in the WHERE. I've tried removing quotes still get the error. Thanks for your suggestions though. k
  18. K

    syntax problem - data type mismatch

    I have this code in a module in Access: CurrentDb.Execute "UPDATE Matchonyyyymm Set FirstDate = 'Y' WHERE MISSN = '" & fssn & "'" The MISSN is a double data type in the table. The fssn is a varient/double in the code. I get a data type mismatch on this line. Can anyone tell me what I'm doing...
  19. K

    INSERT statement not working for one field

    Hello- I have an Insert statement that has a dozen fields that update just fine. One field in the list remains blank after the module has completed. I have checked on the data type, field size etc.. and everything matches. If I change the field size to 2 it fills the field with the one digit...
  20. K

    NoMatch doesn't seem to be working??

    I have the following lines: Set rst3 = db.OpenRecordset("SELECT * from MainRptDataASD where PlanID = " & MyPlanID & " and PmtYr = " & mypmtyr & " and Ltrim(ASD) = ' " & myASD & " ' and Ltrim(IPR) = ' " & myIPR & " '") If rst3.NoMatch Then CurrentDb.Execute "INSERT into MainRptDataASD(PlanID...
Back
Top Bottom