Search results

  1. J

    Help with update record using runsql

    Not completly true this statement, granted that when you use .Execute metode then yes form refrences must be outside the quotes. But since the OP uses DoCmd.RunSQL then this would work fine: DoCmd.RunSQL (" UPDATE [workload] SET [workload].issue_status = forms![main]!issue_status" & _...
  2. J

    Ordering a dynamic query

    You are missing a SPACE before "Order BY... Set QD = db.CreateQueryDef("qryFrmSelectAreas_Dynamic", _ " Select * from tblLookupAreas" & _ " order by tblLookupAreas.Area ASC;") JR
  3. J

    Double Spacing Text Entry - Forms or Reports?

    I woulden't go this way and update the table, keep the tablefield as it was and just call the function on demand in a query or create a calculated field in a reports recordsource. MySpacedField: Iif(Len([TableField] & "") >0, ParseString([TableField]),"") The function needs to be in a...
  4. J

    Double Spacing Text Entry - Forms or Reports?

    No problem. I have updated the function to include some errorhandling in case of "empty strings" JR
  5. J

    Double Spacing Text Entry - Forms or Reports?

    Function ParseString(AnyString As String) As String Dim tmpStr As String Dim lngCount As Long If Len(AnyString) = 0 Then ParseString = vbNullString Exit Function End If For lngCount = 1 To Len(AnyString) tmpStr = tmpStr & Mid(AnyString, lngCount, 1) & " " Next ParseString =...
  6. J

    Open and close an external Access file

    Have you looked into GetObject() ? Function xTestIt() Dim obj As Object Set obj = GetObject("d:\rtf.accdb") obj.Quit Set obj = Nothing End Function This code hooks onto a db called rtf and quits it IF it is open Just a thought. JR
  7. J

    Open and close an external Access file

    Have you checked the Help files under CompactDatabase?? Copies and compacts a closed database, and gives you the option of changing its version, collating order, and encryption. Syntax expression.CompactDatabase(SrcName, DstName, DstLocale, Options, password) expression An expression that...
  8. J

    Combo box not producing correct records

    No mystery here since Access forces dates to US Format (mm/dd/yyyy) when it compares dates, so by selecting 12. March 2012 Access forces this to 3. December 2012 and you get the wrong records. This will happens to all comparisons with days less then 13 for all dates since it is no 13. month...
  9. J

    Verify This

    What error ??? Why .Text property? you can only use this property IF txtCusC HAS focus when the code runs. Try and build the SQL-string first to see if it generates what you expect. Dim strSQL As String strSQL = " select customer.cusno,customer.fullname,customer.idcn,cus...
  10. J

    Verify This

    Sure if your goal is to open a Carthasian product but i suspect that you need an INNER JOIN on the 2 tables. select customer.cusno,customer.fullname,customer.idcn,cus tomer.mobie,customer.reg,customer.dateis,customer. email,sales.pron,sales.blono,sales.lano,sales.sql from customer INNER JOIN...
  11. J

    Copy select fields in one record to another db

    The simplest way would be to use Albert D. Kallal "Super easy Word Merge" found here: http://www.kallal.ca/msaccess/msaccess.html Give it a go. JR
  12. J

    Problems with "{" "}"

    Try to strip away { and }: varID = Mid([SI_ID],2, Len([SI_ID])-2) JR
  13. J

    It's not a date, it's a string!

    Simply put squarebrackets around "[SKU#]='" ..... JR
  14. J

    Compare data between two recordsets - only update fields where different

    The error message gives it away don't it? You say that rs1(F.Value) has a value, but did you hower over rs(F.Value)?? I beleive that says Nothing. You close the rs record set after the first run of your outer loop of rs1. ...snip While Not rs1.EOF For Each F In rs1.Fields...
  15. J

    Combo Box feeding parameters to query problem

    Yes that can make a difference, did you use the .value property of the multivalue field? http://office.microsoft.com/en-us/access-help/using-multivalued-fields-in-queries-HA010149297.aspx?CTT=5&origin=HA001233722 JR
  16. J

    X saves the record

    Lets start at the beginning, you stated this in your first post: Well the answer is that you rely on your users to use your validation/recordmove button "Nova intervencija", and when they don't you get into trouble. So the answer to this problem is to use the CORRECT event to validate records...
  17. J

    Convert 20020322 number into Date Format

    Technically anything is possible, BUT this something that you calculate on demand and not store in the table. As for caluclating workdays that's not easy since you have to test both weekends and holliday's, weekend isen't to difficult but you have to use an Array or a recordset with holliday...
  18. J

    X saves the record

    Fist of that code would not even compile because of a missing parameter in the event statement. Should be: Private Sub Form_BeforeUpdate(Cancel As Integer) If IsNull(Me.DATUM_IZVESTAJA) Or IsNull(Me.ID_RASKRSNICE) Or IsNull(Me.ID_OSOBE_PRIJAVE) Or IsNull(Me.ID_STANJA_PRIJAVE) Or...
  19. J

    X saves the record

    It's because you use the wrong event to validate a record, use the event Form_BeforeUpdate which has a Cancel argument. The all you need in your button click event is this: Private Sub Nova_intervencija_Click() If Me.Dirty Then Me.Dirty = false End Sub That will cover all the bases, you...
  20. J

    Convert 20020322 number into Date Format

    If your Entry_Date and Value_Date is of the datatype Number then you can run this query: UPDATE MyTable SET MyTable.Entry_Date = DateSerial(Left([entry_date],4),Mid([entry_date],5,2),Right([entry_date],2)), MyTable.Value_Date =...
Back
Top Bottom