Search results

  1. K

    You Cant Assign a Value to the Object - Access Report

    The Following is the code iam using to populate the text box tsOrigin Public Sub repPopulate() Dim db As DAO.Database Dim rs As DAO.Recordset Dim qdf As DAO.QueryDef Dim prm As DAO.Parameter Dim orig As String Dim countrec As Integer Set db = CurrentDb Set qdf =...
  2. K

    Form Does not Display ReQueried Results

    Iam using using TempVars to change the controls of the query, below is the code TempVars.Add "tvyr", Trim(Me.cmbCropYear.Value) Me.RecordSource = "SELECT * FROM [qryNNDocsDue]" Me.Requery But the result shown in the datasheet form is for all the Years. Am i writing something wrong here? Pls...
  3. K

    Solved Format() String thru VBA

    Iam trying to change the Format of a Textbox Pragmatically. I need the Text Box to Show "CHN\GO\ "000 but when i use s BackSlash in the Format() i get the Runtime Error 13, Type Mismatch. iam using Format(Me.Text, "CHN\GO" \ 0#)
  4. K

    Solved Change Recordsource for a Sub.Report

    i have 3 subforms in a form, want to change the recordsource for all the 3 forms if to be displayed in this form. iam using the following: If TempVars!sRepRecSrc01 <> vbNullString Then Me.Pro_FormaDue.Report.RecordSource = TempVars!sRepRecSrc01 Error is You Entered and Expression That Has an...
  5. K

    Store Access Criteria in a Global String

    I want to store the below Form Criteria in a Global String Like " * " & [Forms]![frmReports]![cmbCropYear] & " * " When i store it returns nothing, request someone to help.
  6. K

    Dcount with Multiple Conditions

    Iam getting error with the following Line: If DCount("[Duty]", "tblstaff", "[SellerID]= sSellerID And ([Duty] = 8 Or [Duty] = 12)") >= 1 Then Also tried - If DCount("[Duty]", "tblstaff", "[SellerID]=" & sSellerID And "([Duty] = 8 Or [Duty] = 12)") >= 1 Then sSellerID is an Integer Can Someone...
  7. K

    Get Email Address of multiple records

    Iam trying to get the Email Address of 2 Staffs is "tblStaff" with 2 Conditions. one condition is the sellerid and second condition is duty=2. following is the code iam using. If DCount("[Duty]", "tblstaff", "[SellerID] = [cmbSeller] AND [Duty] = 2") >= 1 Then For i = 1 To DCount("[Duty]"...
  8. K

    Show All records in Access Query for null entry

    Iam Using the SQL LIKE "*" & Forms!YourFormName.YourComboBoxName & "*" in the Criteria of a Access Query. i have 4 controls to be searched like this. I need to search a field with Numbers. While Searching for "1" it returns 18,16,12,13 instead of just returning "1" if i use...
  9. K

    Unable to Delete After Unmatched Query

    The Following is my Sql, iam able find the record to delete but iam unable to delete as its Says "Specify the table Containing the records you want to delete" DELETE tblBciCMiA.ContNo, tblBciCMiA.InvNo, tblBciCMiA.Seller, tblBciCMiA.Buyer, tblBciCMiA.Qty, tblBciCMiA.Cert, tblBciCMiA.RQty...
  10. K

    Error with CASE WHEN

    iam getting the Incorrect Near the Keyword 'AS', Can anyone help me. The following is the code. SELECT CASE WHEN [tblcontract].[ShipCont]=2 OR [tblcontract].[ShipCont]=3 THEN CASE WHEN [tblcontract].[DtShip02] IS NOT NULL AND [tblcontract].[DtShip03] IS NOT NULL AND...
  11. K

    Query to Show Certain String

    I Have a tbl for courier having Order Number and Reference. I have "Tea" and "Coffee" in references. I want to Show Records for "Tea" Only but Not for Order Numbers with Both "Tea" and "Coffee". Can Someone Help.
  12. K

    Display Columns of Row in ComboBox

    Hi, I have a table as below: ID City1 City2 City3 City4 City5 City6 Michigan aa bb cc dd ee ff i have a combox cboState to select the State Michigan In combobox cbocity i need itemdata as aa;bb;cc;dd;ee;ff Iam sure there should be way other than an union query. Request anyone to Help.
  13. K

    Search Using only part of the Text

    I have the following Code: Dim filterStr As String filterStr = "" If Len(txtBuyerName) > 0 Then If filterStr = "" Then filterStr = filterStr & " ([BuyerName] Like '*" & txtBuyerName & "*')" Else filterStr = filterStr & " And ([BuyerName] Like '*" &...
  14. K

    Send Report in Body of Outlook

    Dear All, The Following is the Code iam using to send the File as attachment thru outlook, i require some reports to be sent thru body of the email in outlook. Can anyone help Dim sFile As String Dim sFolder As String Dim sSubject As String Dim sMessage As String sFolder =...
  15. K

    combo box to show 6 MonthName from September

    I Have written the Following Code: Private Sub Form_Activate() Dim x As Integer Dim m As Integer m = Month(Date) With Me.cmbShip01 Me.cmbShip01.Value = Null For x = m To 12 .AddItem MonthName(x) Next End With End Sub This Populates Month Names from the...
  16. K

    Exclude Column in the combobox

    I have this following Access Query SELECT tblcontract.DtShip01 AS ShipDate, tblcontract.ContNo, tblpayments.SMonth FROM tblcontract LEFT JOIN tblpayments ON tblcontract.ContNo = tblpayments.ContNo WHERE (((tblcontract.DtShip01) Is Not Null) AND...
  17. K

    Run-Time Error 2427 You Entered an Expression Which has No Value

    I have the following Code Which Results in You Entered an Expression Which has No Value Private Sub Report_Load() Dim sContNo As String sContNo = "Buyer" & " " & "GAIE/IMP/" & Format(Me.ContID.Value, "000") Me.Report.Caption = sContNo End Sub There is No Problem when i Compiled...
  18. K

    Filter Form Data using Dates

    Iam using the below code for filtering a data in a Subform, the filter works for dates in the current year. but if i include the from date starting 2018. it shows all the datas. kindly help. If Len(txtFromDate) > 0 And Len(txtTodate) > 0 Then If filterStr = "" Then filterStr...
  19. K

    Unable to Display Buyer and Seller Name

    The Below is Screen shot of the query iam trying to work. i want the Buyername and Party Name to Display. Can someone pls help.
  20. K

    Text Box Value without " " while calling a function

    Iam Calling a function in a form using value of the TextBox. But invariably the Text Value is Shown as "Forms!Contracts!lstBox" but i want to display as Forms!Contracts!lstBox only. Need Someones help here
Top Bottom