Search results

  1. J

    Find second to last date

    You're welcome.
  2. J

    Add New Record via VBA

    That is correct. Having it a numeric field is easier. You can always concatenate the word "game" when you want to display it as Game 1, Game 2 etc. It will save you a lot of typing. For example, in a form you would still bring in the game number field into a control (but hide the control)...
  3. J

    Find second to last date

    I split it into two queries just to make things a little easier. You can of course, nest the queries. If you want to do that, the query would look like this SELECT qry2mostrecent.ID, Min(qry2mostrecent.Startdate) AS MinOfStartdate FROM (SELECT vwAttendances.ID, vwAttendances.SchName...
  4. J

    Find second to last date

    I would remove the TOP 1 from your query. This query should give you no more than two records per person (the two most recent per person or one in the case of Mic) SELECT TOP 1 vwAttendances.ID, vwAttendances.SchName, vwAttendances.STARTDATE FROM tbl_05 INNER JOIN vwAttendances ON tbl_05.ID =...
  5. J

    Add New Record via VBA

    Using your check-in form would probably be the best. Is this check-in form bound to a table? How does the check-in take place? Do you manually enter a value in the check-in control or is it done via a combo box? With respect to the code, it would be fairly simple in that you would execute an...
  6. J

    VBA for Update Query

    You're welcome.
  7. J

    VBA for Update Query

    If the additional criteria is what you need, there would be no problem adding it. If the vessel date field is a date/time data type, it must be delimited by # signs. This is what the statment would look like. You will have to add the control/variable that provides the date value mySQL=...
  8. J

    VBA for Update Query

    Since the value in the control is a variable, it cannot be enclosed within the double quotes but must be concatenated to the string. Additionally, if the vessel name field is a text data type then the value from the control must be delimited with single quotes. "WHERE Tbl.Fields(Vessel Name)...
  9. J

    Type Mismatch Error - I cannot figure out why. Help Please.

    I'm assuming that this is where the error occurs If ![Source] = "CCPS" Then strSource1 = ![Source] And intspan1 = ![Span] And strCCode1 = ![ComponentCode] And strCCPSflg1 = "Yes" End If I don't know for sure, but I do not think that you can have the word AND in the IF THEN structure. Each...
  10. J

    removing dashes from SSN

    You can use the Replace function as follows: SELECT Replace([SSN],"-","") as SSNNoDashes FROM tableanme
  11. J

    filter by form

    The double quotes work because you are searching a text field. In Access as well as many other databases, text data seaches have to be enclosed in some kind of delimiter. In Access, dates have to be enclosed by # signs. Numerical values generally do not need delimiters.
  12. J

    filter by form

    I created an example database, and the only time I could generate the error you discussed is when I intentionally misspell the e-mail address such that it is not an exact match to a record in the database AND I do not enclose the string in double quotes. If I type an existing e-mail address...
  13. J

    filter by form

    I assume that there is some code/macros that run when you conduct the search. Could you provide that code/macro?
  14. J

    Creating a Transactional Tracking Database

    The key to any successful database application is setting up the appropriate table structure (tables and the relationships between the tables). So that has to be done before working on forms, queries and reports. The database in the link you provided is strictly an attendance database, so it...
  15. J

    Check for existing record from 2 criteria

    You are welcome.
  16. J

    How to get a calculated Total from a textbox into a Table

    Welcome to the forum! In general, calculated values should not be stored in the table, only the values that go into making the calculation. If you put a calculated value in a table and you change one of the values that went into the calcuation the total is not automatically updated. Using a...
  17. J

    Check for existing record from 2 criteria

    First, I would strongly recommend not using the word EXISTS as a variable. EXISTS is an SQL keyword. If DLookup("quoteid", "tblweldquotes", "quoteid = forms!frmpipequotation!quoteid") > 0 And DLookup("handbraze", "tblweldquotes", "quoteid = forms!frmpipequotation!quoteid") = True Then In the...
  18. J

    Is it possible to display the date range entered on report?

    You can include the two date parameters ([Enter Begin Date], [Enter End Date]) in the SELECT clause of the query, that way they would be available as fields for the report. Another way is to use an unbound form to enter the dates and then have the report run from a button on the form. You...
  19. J

    Update table from Form

    First, the word date is a reserved word in Access so it should not be used as a field name; for now you will need to enclose the field name in square brackets ", [Date]='" & Me.TxDEDate & "'" & _ Based on your code above, it implies that the date field has a text data type. Is that correct...
Back
Top Bottom