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

    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.
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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")...
  9. 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.
  10. 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...
  11. 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...
  12. 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...
  13. C

    Exporting Reports To MS Word

    Hi there I have a database that contains around 6 or 7 reports. I want to be able to output these from the click of a button into MS Word. Now I can easy do this by creating a word doc for each report but ideally I would like to have all 6 or 7 reports in the same word doc. with each report...
Back
Top Bottom