Search results

  1. C

    SQL String Text

    I have the following SQL but I can not get the me.assetsubasset into text format and therefore the statement does not run Can anybody help? Here is the SQL: dbs.Execute ("SELECT [Reactive Scorecard Data].[Asset & Sub Asset], [Category Lookup Table].Category, [Reactive Scorecard Data].[Day...
  2. C

    PDF Format

    Please could you post your code for printing to cute pdf bypassing the save option
  3. C

    Auto Create and Rename PDF Files

    Hi I have a report that I want to print to pdf. I am using docmd.openreport."reportname" However this produces a dialog box "save as" I want this pre determined in the code. Is this possible? Thanks in advance Carl.
  4. C

    Currency Field in Query

    Hi all I want to create a new field in a make table query. I want this to be a currency field that gets updated at a later stage. I have tried Budget:0 but I do not get the decimal points, I want to use something like #,##0.00 but the syntax is wrong, does anyone know the correct way of...
  5. C

    Can't quite get the SQL correct

    I have some code: SQLTXT = "Select * from Qry_Budget " _ & "WHERE ((ManagerID =" & ManagerID And dbo_period.PERIOD <= "& Me.txtperiod)" But I can not quite get the syntax right can anyone help. In english I need to take everything from qry budget where managerid = manager id and...
  6. C

    Too few parameters. expected 1 Error

    Manager ID is a number and when you debug and hover over the manager ID it displays the ID correctly so thi scan not be causing the issue. I believe the problem lies in the query because when it is like this: SELECT dbo_SGP_MT1Managers.ManagerName, dbo_SGP_MT1ManagerOccupantLink.ManagerID...
  7. C

    autoexec compacting issue

    Hi all I have a database that has an autoexec macro, at the end of the macro some code runs that compacts the database. All works fine apart from once the compact has finished and the db opens up again the autoexec is once again invoked and it gets stuck in a loop. Is there anyway of...
  8. C

    Too few parameters. expected 1 Error

    Hi all I have some vba code as follows: Private Sub Search_button_Click() 'Dim dbs As CurrentDb Dim rc As DAO.Recordset Dim Budget As Double Dim BestValue As Double Dim Spend As Double Dim Difference As Double Dim SQLTXT As String Dim ManagerID As String...
  9. C

    Exporting Forms and Reports from One db to another

    I have some code that wroks brilliantly for exporting all atbles and queries in a db to another db. However I come unstuck when it comes to exporting forms and reports: Here it what I have for tables and queries, For Each tdf In mydb.TableDefs If (tdf.Attributes And...
  10. C

    Backing Up a database

    I know its not wise but I really need to do it, I cant for the life of me find a copy command that will let me do it though.
  11. C

    Copy a database

    I have the following to copy a database, but its not working any ideas Sub CreateDatabase() Dim wrkDefault As Workspace Dim dbsNew As Database Dim DateSave, TimeSave Dim newdb Dim StoreFolder Dim dbname As String DateSave = Format(Date, "ddmmyy") TimeSave = Format(Time, "hhmm")...
  12. C

    VBA Error

    Yeah Soz, Function swapout() Dim Rs As DAO.Recordset Dim Db As DAO.Database Set Db = CurrentDb() Set Rs = Db.OpenRecordset("Plaistow Primary School", dbOpenDynaset) Do Until Rs.EOF Rs.Edit Rs("Job Details") = replace(Rs("Job Details"), Chr(10), "") Rs.Update Rs.MoveNext Loop Rs.Close Set...
  13. C

    Backing Up a database

    Hi Is it possible to create a backup or a copy of a database from code whilst in the database you wish to back up? Thanks Carl.
  14. C

    VBA Error

    Thanks guys problem solved
  15. C

    VBA Error

    Hi I have this code Function replace() Dim Rs As DAO.Recordset Set Rs = CurrentDb.OpenRecordset("Plaistow Primary School") Do Until Rs.EOF Rs.Edit Rs("Job Details") = replace(Rs("Job Details"), Chr(10), "") Rs.Update Rs.MoveNext Loop Rs.Close Set Rs = Nothing End Function However...
  16. C

    Replacing in text access

    The code produces the following error message: Cannot open any more databases and stops on line 2 of the code any ideas????
  17. C

    Replacing in text access

    Hi I need to replace carriage returns in a field in access. Now I know that replace([fieldname],chr(13)," ") will do what I need but I want to be able to apply this to all records in this particular field in one hit, and not create another field to ahcieve it. Does anyone know the syntax for...
  18. C

    Sub Reports in a Main Report

    GaryPanic When you view the reports individually the page headers are there, they print and everything. However as soon as you place the report as a sub report the page headers although they can be seen in the sub report do not show when the report is viewed. The detail does but no headers...
  19. C

    Sub Reports in a Main Report

    Hello people I was wondering if anyone out there could help. Myself & Duance are trying to put 6 or 7 reports as sub reports into one main report. We are placing the sub reports in the report footer with a page break in between each one. However when we view the main report anything in the sub...
  20. C

    Exporting Reports To MS Word

    Ok, how would I do this?
Back
Top Bottom