Recent content by unclejoe

  1. U

    Not In query

    if both "Not In" and "<>" is not working for you, try this strSQL = "SELECT tblQ.[Q No] " strSQL = strSQL + "FROM tblQ INNER JOIN tblAQ ON tblQ.[Q No] = tblAQ.[Q No] " strSQL = strSQL + "WHERE tblAQ.ID = " & Me.cboP & " AND tblQ.[Q No] NOT IN " strSQL = strSQL + "(SELECT tblAQ.* FROM tblAQ...
  2. U

    Not In query

    I don't believe "Not In" will work here It can be something like this strSQL = strSQL + "WHERE (((tblQ.[Q No]) <> ([tblAQ].[Q No])) If you want to use a subquery, "WHERE Not In (Select col1, col2,,, from table where id = id) Check or refer to the correct syntax at Allen Browne's site. And...
  3. U

    Dlookup problem

    My guess would be the missing "&" at 2) txtScore.Value = DLookup("[Score]", "tblAQ", "ID = '" & Forms![frmQ]!cboP & "'" & " And [Q No] = '" & Forms![frmQ]!txtQ & "'")
  4. U

    Refering to a Listbox

    The Len() function will cause an error if the textbox is Null. You'll have to remove the Null condition with this.... If Len(Me.CompanyName & "") Then Note: There is no space between the double quotes.
  5. U

    Auto Fill

    This the Perform Name AutoCorrect feature in Access. You had renamed the controls, but in the process you left two spaces when you save the form. There are two underscores actually, not one as in missinglinq post. For example, if you name your control as “First Name” with a space, Access will...
  6. U

    ODBC Connection for Cognos

    If the back-end server is Oracle/SQL Server/MySQL then use Access ODBC connection to link the tables. As far as I see it, Cognos is a front end application.
  7. U

    Question Formatting in Access

    In the table or the form? (I mean, formating the control or field in the table.) In the control properties, set the Format to "Fixed" and "Decimal Places" to 0. In the Table of the Column/field, select the column/field you want to edit and in the "General Tab" set the "Format" to Fixed and...
  8. U

    report filter

    Is this correct? Can you confirm this? str_Filter = "[Case Number] = & Case" It should be...look at the qoutes str_Filter = "[Case Number] = " & Case If [Case Number] is integer/Long. and DoCmd.OpenReport "unrelated SCT1", acViewNormal, str_Filter is "unrelated SCT1" correct? Should it be...
  9. U

    report filter

    If Me.Dirty Then 'Save any edits. Me.Dirty = False End If The above code saves the current input record on the form. If the current record is not save, you will not be able filter to this record as it is not in the table. If Me.NewRecord Then 'Check there is a record to print...
  10. U

    How to remain original RecordSource

    Hi, If you use named queries, then = "YourQueryName". Another is on the form just below the option declaration.. Option Compare Database Option Explicit Dim YourSQLString As String ' or just put this into the open event Somewhere in your open event of your form... YourSQLString =...
  11. U

    How to remain original RecordSource

    Hi, It's a search form, but you'll get the idea. You might want to start something like... Select ...From Table Where...Order By Forms!YourFormName!SearchCombo In the combo Row Source Type to "Value List" and in Row Source key in "Column1;Column2..." where column1 is the field of the...
  12. U

    How to remain original RecordSource

    Hi, You didn't say much about why on changing the recordsource. It appears that you are only sorting the ascending or descending order. You should use a combo box to sort the order instead. Here's one form Allen Browne. Sort by combo
  13. U

    unable to detect zip files

    Your code works on my end. Maybe you need to check the "DatabaseDir". Is it pointed to the correct path?
  14. U

    What am I doing wrong? How should the code be written?

    Remove the colon from the following.... Then tell us what is the error.
  15. U

    docmd.openform and openargs making me crazy

    Hi Molly, I have resolved this form "frmAuthorEntry" for the onload event Private Sub Form_Load() 'Dim Args As Variant Dim Args() As String If Not IsNull(Me.OpenArgs) Then Args() = Split(Me.OpenArgs, ",") Me.AuthorLastName = Args(0) Me.AuthorFirstName = Args(1)...
Top Bottom