Search results

  1. J

    Parameters to Query String

    Something along the lines of this: With CurrentDb.CreateQueryDef("", "Insert Into MyTable (MyNum,MyText,MyDate,MyBool) " & _ "Values(p0,p1,p2,p3)") .Parameters(0) = Me.tNum .Parameters(1) = Me.tText .Parameters(2) = Me.tDate .Parameters(3) =...
  2. J

    Insert and Update at the same time

    Not exactly true, you can both Update old records and insert new records with the same UPDATE query using an outer join with no where-clause. ex: UPDATE tblSource LEFT JOIN tblDestiantion ON tblSource.SourceID = tblDestiantion.DestID SET tblDestiantion.DestID = [tblSource].[SourceID]...
  3. J

    concatenate data in one cell in a report/query

    You have named the module with the same name as the function, you can't do that. Rename the module to something other than ConcatRelated. ex. mdlConcatRelated JR
  4. J

    Alternative to IsNumeric

    differential operator - probably JR
  5. J

    update record or add record

    I have never used SQL Server, but if I where to guess is if ItemNum is the Primary key in your SQL Server table and you are not permitted to change it, try and remove Inv_Recd2.itemNum = Inv_Recd.ItemNum From the SET-clause in the update query Just a thought, others with more knowlage of...
  6. J

    update record or add record

    Just use a Update query with an Outer Join on ItemName and it will Update existing records and add new records to items not found in Inv_Recd2. Something like this: UPDATE Inv_Recd LEFT JOIN Inv_Recd2 ON Inv_Recd.ItemName = Inv_Recd2.ItemName SET Inv_Recd2.ItemNum = [Inv_Recd].[ItemNum]...
  7. J

    Concatenate with Nz

    Yeah you are right, but how about: DESIREDFORMAT: Replace(Trim(([CBNOPREF]) & (" "+[CBWORD]) & (" "+[CBEXCEL]))," ",";") You insert a space between the elements, trim surplus space and finally insert your seperator of choice. JR
  8. J

    Concatenate with Nz

    How about null propagation: DESIREDFORMAT: ([CBNOPREF]+";") & ([CBWORD]+";") & ([CBEXCEL]) If any result inside the presens is NULL the hole expression is evaluated to null Just my 2 cents JR
  9. J

    Find and Delete specific record

    Warning deleting records are FINAL!! Just execute a delete query with a Where-Clause that specify which records are to be deleted. CurrentDb.Execute "Delete From Admin Where Createdby = '" & Environ("username") & "'", dbFailOnError JR
  10. J

    Help! append multiple data with update Query

    Not true, you can use an update query with an outer join to append records. ex 1: (this will append new records only) UPDATE Tbl1 LEFT JOIN Tbl2 ON Tbl1.ProductName = Tbl2.ProductName SET Tbl2.ProductName = [Tbl1].[ProductName], Tbl2.Price = [Tbl1].[Price] WHERE (((Tbl2.ProductName) Is...
  11. J

    Code to update a multivalued field?

    No problem JR
  12. J

    Code to update a multivalued field?

    If you insist on using MultiValue fields, then bookmark this webpage: http://office.microsoft.com/en-us/access-help/using-multivalued-fields-in-queries-HA010149297.aspx#BM9 See attached db for one way to do it, by using an Array to append each month to the table. Since you can't mass append to...
  13. J

    Clear values in multi-value field

    See if this helps: http://office.microsoft.com/en-us/access-help/using-multivalued-fields-in-queries-HA010149297.aspx#BM9 JR
  14. J

    Locked out of DB after disable shift

    see if this helps: http://stackoverflow.com/questions/4184455/disable-shift-key-on-startup-in-ms-access## JR
  15. J

    renaming objects

    Check out V Tools deep search: http://www.skrol29.com/us/vtools.php JR
  16. J

    Need help in updating a record in unbound

    & ",Telephone_number='" & Me.txttelephonenumber & "' Missed a single quote JR
  17. J

    Inconsistent error

    A better solution is to create a temporary QueryDef to execute, the you don't have to worry about dizzeing qoutes and date delimiters. With CurrentDb.CreateQueryDef("", "INSERT INTO GoodJobNotesQuery " & _ "(StudentID,GJNotes,Team,LastName,FirstName) " & _...
  18. J

    Inconsistent error

    The single qoutes inside your strings are breaking up sSQL-string, you need to double up your quotes around any of the value fields that CAN contain a single qoute. like O'Brian. ex: """ & Me.text50 & """" or use Chr(34) as a wrapper for more a more readable code. Chr(34) & me.Text50 &...
  19. J

    Split MDB error 3219

    Taken from Access helpfiles: so: Set rsTable = dbsCurent.OpenRecordSet("Import650tbl, dbOpenDynaset, dbAppendOnly) JR
  20. J

    INSERT Statement in Form

    Glad you got it to work, there is another way where you don't have to worry about delimiters and regionalsettings. You can create a temporary QueryDef and execute it ex: With CurrentDb.CreateQueryDef("", "Insert Into MyTable (MyNum,MyText,MyDate,MyBool) " & _...
Back
Top Bottom