Recent content by peljo

  1. P

    send to a pass protected db

    I am exporting all my tables with the folloiwng function: Public Function ExportAllTablesP(DBName As String, strPassword As String) As Boolean ' call it so : ExportAllTablesP "C:\be\be.mdb", "secret" Dim FrontDB As Database, BackDB As Database, Tbl As DAO.TableDef Set FrontDB = CurrentDb Set...
  2. P

    commas

    I am again having problems with these damned commas, they seem never to conform to my knowledge.I tried to convert the otherwise good and working update query into an sql but i got red colours showing that Access does not accept my commas.I tried with single commas ' or with double commas """"...
  3. P

    union query

    Will you help me built a union query ? I have 2 queries, qryinput and qryoutput.Out of these query i have a third query called qryDiff substracting these queries. However qryDiff does not show all the goods sold, only those goods that are substracted.Therefore i want to build an union query...
  4. P

    Syntax error

    I want to include the the value lngMaxOrderID which isn't used in the second SQL string, so I am finding my Order DetailsTemp with records for many other OrderIDs. Therefore I tried to attach this value to the string, but then I get red letters which means that my sql is not right. Would yo...
  5. P

    send to email

    I have to send a query in cvs format to my ;ogistics centre.With the help of the forum i succeeded to do it : DoCmd.TransferText acExportDelim, "qryDocExportSpecification", "QryDocs", "QryDocs.csv" My question is, can i email this directly ? The same as the sendobject command like ...
  6. P

    Converting into cvs format

    I have a code for converting into a cvs format: DoCmd.TransferText acExportDelim, "qryDocExportSpecification", "QryDocs", "QryDocs.csv" However, the file i get at the end in MyDocuments is an excel file and not a word norepad file. Why is i so and how could i correct this situaion ?
  7. P

    Cannot save a date

    I am at a loss why i cant save the todays date.On my form i have a control called LastUpdated.It is set to day/time and to a short date.I want to save the present date by the following: Me!LastUpdated = Now RunCommand acCmdSaveRecord DoCmd.Close acForm, Me.Name However the field lastUpdated...
  8. P

    Global variable

    In my form i have to declare seceral times the following expression: Dim OfficeBranch As Control Set OfficeBranch = Me.Controls("Branch" & (Me.Parent.office - 1)) Can i make the above expression to be valid for all the functions in the form, and thus avoid declaring it in each case?
  9. P

    Locking a control

    Subsequently i have found out the following. it is the If IsNull that does not work , However if i write If Me!Brancho = 0 then it works. Whys is it so ? If Me!branch0 = 0 Then 'If IsNull(Me!branch0) Then Me!cartons.Enabled = False End If
  10. P

    Locking a control

    I want to lock a control in the subform but i cannot do it.Even though the control brancho is Null, the control cartons is not locked.Can you help me ? Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me!branch0) Then Me!cartons.Locked = True End If End Sub
  11. P

    Delete all tables

    But why do i then get the mesage invalid object ? Public Function DeleteTables() Dim dbs As DAO.Database Dim i As Integer Set dbs = CurrentDb ' Loop backwards through relations For i = dbs.Relations.Count - 1 To 0 Step -1 dbs.Relations.Delete dbs.Relations(i).Name Next i ' Loop backwards...
  12. P

    Delete all tables

    Thank you for the reply.I get the message "unqualified or invalid reference" : Dim dbs As DAO.Database Dim i As Integer Set dbs = CurrentDb ' Loop backwards through relations For i = dbs.Relations.Count - 1 To 0 Step -1 dbs.Relations.Delete dbs.Relations(i).Name Next i ' Loop backwards through...
  13. P

    Delete all tables

    I have a function that deletes all the tables in the database.However i do not want to delete the tables TblSpecial1 and TblSpecial2.How can i rewrite the code ? Public Function DeleteTables() Dim dbs As DAO.Database Dim i As Integer Set dbs = CurrentDb ' Loop backwards through relations For i...
  14. P

    Counting the greatest number

    Thank you to you all ! Now my code works awsome and i am very grateful to you indeed !!!!!!!!!!!!!
  15. P

    Counting the greatest number

    Please do not be angry with me I am confused and do not know how to handle it.On the basis of the first query I need to delete from table1 all the rows which do not correspond to the figure received with the query.In my case this is the figure 2 since it occurs three times, and I must delete the...
Back
Top Bottom