Search results

  1. D

    convert excel formula into sql

    Hi, I have problem convert the following excel formula in to sql code can someone help me? EXCEL (formula for column called MONTH) =IF(OR(G5="LIBOR",G5="FRCOM"),IF(IF(J5="null",I5,J5)<$A$1,1,ROUNDDOWN((IF(J5="null",I5,J5)-$A$1+1)/365*12,0)),-1) please copy the following sample data into...
  2. D

    Invalid Procedure call

    SELECT [TDPosting Table_CPG].[Trade Ref], MID([TDPosting Table_CPG].[Trade Ref], 1,INSTR([TDPosting Table_CPG].[Trade Ref], '|')-1)& LEFT([Book Name],7) & [Posting Currency] AS Product, Right([Trade Ref],Len([Trade Ref])-InStrRev([TDPosting Table_CPG].[Trade Ref],'|')) AS [Trade ID], [TDPosting...
  3. D

    fail importing file name with dot

    Hi, I failed importing filename of TD_PLDecompLeg.AFS_HEL_ALL.2-27-2009.csv in both macro and manually but no problem with TD_PLDecompLeg.AFS_HEL_ALL.2-27-2009.csv any idea? thanks alice
  4. D

    parse substring in string

    Hi, I would like to extract 13743 from a string CNG_AWE SR TRS PAY Bond 7.875 01Mar11 USD - 13Oct05 to 13Oct09|||13-Oct-09|CNG_AWE|13743 a column in a table has a lot of strings like the one above, but they have different length, such as the one below NAB SUB TRS PAY Bond 8.60 19May10...
  5. D

    retain format exporting to Excel

    Hi, I failed to export a text column (such as 00123) from access tabl to excel. In Excel the column turns to 123 please help thanks
  6. D

    code in a query disappear after executing some objects

    Hi, I built a database which consists of many queries. I notice some query object come empty after I executing some queries. anyone know to how prevent this happen? thanks
  7. D

    how did the form buid in the attached database?

    could you please provide me detail steps to build the forms called Substrates Demand_Supply and tmp_Substrates? I couldn't upload the file because it is over 399KB if you are interested in taking a look of the database, please email me at alice.t.lee@tdsecurities.com thanks
  8. D

    fail to query records that don't exist in another table

    Hi, In the Query11, i am comparing two tables' Prod_Str columns and return the Prod_Str record which doesn't exist in tbl_Reconcile_Loans_Breakage_Loans the query11 doesn't do the job as i expect. could you tell me what the problem is.. thanks
  9. D

    get runtime 2488 when executing DoCmd.ApplyFilter

    Hi , I keep getting runtime error 2488 when executing the following code highlighted in Red: Private Sub cmd_Total_Cairo_Per_Month_Click() Dim tostring As Date Dim fromstring As Date fromstring = CDate(Format(InputBox("Please enter from month and year (mmm yyyy)"), "mmm yyyy")) tostring =...
  10. D

    why the code would delete data?

    Hi, the following code is to call a function to display data in a form and then print it. I don't understand why the following code would delete data after printing. please advise Private Sub Cmd_Print_Click() Dim db As Database Dim lrs As DAO.Recordset Dim LSQL As String...
  11. D

    why does the forms would minimize after closing some other form?

    Hi, My switchboard , other stuffs are built in form. the switchboard would open the first form and then the first form would open the second form. Please note, they are open in full screen size when I close the second form, or some other forms. the switchboard and the first form would be...
  12. D

    why a column doesn't get updated

    Hi, I am trying to update fields in a table. everything get updated correctly except the field [Modify By] DoCmd.RunSQL "UPDATE DOP_new SET [Modify BY] = '" & Itm_Logged_by & "' where [TrackingID] = " & Me![TrackingID] & ";" DoCmd.RunSQL "Update DOP_new SET [Modify BY] = '" & Itm_Logged_by...
  13. D

    would like to enable a button when openform

    Hi, I would like to enable a button when open another form I tried the following: DoCmd.OpenForm "frm_Create", acNormal, , "[TrackingID] = " & Me![TrackingID], acFormEdit, , Form_frm_Create.cmd_Delete.Enabled = True the above code does work but it can't enable the button. please advise...
  14. D

    syntax error -- Case statement in Query

    Hi, I received syntax error for the following statement SELECT CASE [File Type] WHEN 'Security' THEN 'SEC' WHEN 'Admin' THEN 'ADM' END AS FT FROM [tbl_Core Non-Core] please advise thanks Alice
  15. D

    how to capture the input data for a query of a form and pass it to vba code

    Hi, I have a form which RECORD SOURCE (you can find it in the form design) consists the following query : SELECT DOP_new.[Barcode #], DOP_new.[Deal Name], DOP_new.[Client Name], DOP_new.[Reference #], DOP_new.[Document Date], DOP_new.[Document Type], DOP_new.[Number of Documents]...
  16. D

    compare date in vba

    Hi, I would like to compare an input date and current date in a IF statement I have no idea why the following code doesn't work properly If Format(Itm_Date_of_Shipment, "mm/dd/yyyy") >= format(now(), "mm/dd/yyyy") then ' update the table... else ' display error message end if...
  17. D

    why does Update statement in VBA work incorrectly?

    Hi, I wrote an UPDATE statement in vba which would take and update input date into a table. here is the code: DoCmd.RunSQL "UPDATE DOP_new SET [Shipped] = -1, [Date of Shipment] = " & Itm_Date_of_Shipment & " Where ([Date of Shipment] is null) And [BarCode #] = " & Itm_BarCode & ";" it...
Back
Top Bottom