Search results

  1. J

    Query Most Recent

    hotrodsue, How are you recording your data? Is it only 1 weight recorded per day, or possibly multiple weights recorded per day? I only mention that since it will complicate your intention of obtaining the "most recent 3 by date". Here is an article which may help you conceptualize what...
  2. J

    need help with timer on access form

    Hello and Welcome! You shouldn't be so hard on yourself - we're all deficient to some degree with our tech abilities ;) So there are 3 things for you to consider: (1) The "DateAdd" function (2) The ".Value" property (3) "Select Case" control structure With DateAdd, your [Timer1] value becomes...
  3. J

    syntax error

    You're welcome, and thanks for posting back your solution - I was taking a shot in the dark with the parentheses, but I know Access is fussy about them with the joins :)
  4. J

    query into vba without loads and loads of queries......

    Firstly, I would say you'll want to read up on Parameter Queries, which will save you from having to create a saved query for each year Secondly, it looks like you're mixing your data types, coercing Numeric values into Strings. But since the Year function returns a Variant, you should be ok...
  5. J

    syntax error

    Hello and Welcome! Did you try enclosing your first LEFT JOIN clause in parentheses? FROM subjects b LEFT JOIN (students_subjects c ON b.subject_id = c.subject_id) LEFT JOIN students a ON c.student_id = a.student_id And of course, the semicolon should close your entire SQL statement HTH, John
  6. J

    noob - help automatically populating field

    Hello and Welcome! Be forewarned, it's likely that a few other folks may add some thoughts on this subject. I can imagine that you're knee (or neck) deep in some sort of reconciliation process between a couple different source files. :( I would recommend against actually storing an Employee...
  7. J

    Problem with Field

    Hey CCK, I don't have A2007, so the only way I could make sense of your situation is if you listed your tables and fields (not that I know much about accounts-receivable type data models), i.e.: WorkOrders - WorkOrderID a/n (pk) - WorkOrderDate date WorkSpecs - WorkSpecID a/n (pk) -...
  8. J

    Subform requery problem

    Hi Karyn, I think if you put: qryT.Close Before your Requery, then the changes you've made to the query will be saved, and the Requery will run accordingly. HTH, John
  9. J

    Combining fields in a text box

    Not sure what's going on with your Left function, but your code doesn't correspond to what you say you want to do: So, unless I've misunderstood, I would think all you need is:Me.txtQuickName = Left(Me.txtFirstName,1) & "." & Me.txtLastName(Assuming you have a text box for Last Name...) And...
  10. J

    Run-Time error if save cancelled, how to overcome?

    Looks like a classic case for putting in some error handling (which I could use some brushing-up on myself): Private Sub cmdOKRepHQAll_Click() On Error GoTo cmdOK_Error If IsNull(cboREPAll) Then MsgBox "You must choose a Rep." _ & vbCrLf & "Please try again.", vbExclamation, _...
  11. J

    Problem with Field

    Missinglinq, you know, maybe CCK is doing databases as a side-gig just to make ends meet. Jazz musicians are notorious for barely scraping by...;) "Did you jazz happen to be around When Lester left town?" "He had to split fast. He heard the forecast." - some lyrics to the Wayne Shorter tune...
  12. J

    Problem with Field

    ... and before someone else picks up on it, you might be able to eliminate the IIf altogether and simply use: =Nz(DSum("[PaymentAmount]","Payments","[WorkorderID]=" & [WorkorderID]),0) Provided you don't have legitimate records with [WorkorderID] = Null
  13. J

    Problem with Field

    CCK, Your Null is propagating to the third argument of your IIf. The IIf function always evaluates all 3 of its arguments, so even if the 1st argument evaluates to True, it still evaluates the False (3rd) argument, while attempting to return the True (2nd) argument. So, try...
  14. J

    Problems with saving a number

    012 is not an integer (although a number theory person might wish to debate that), so it would be impossible to store it as an integer. But assuming you want the values in your "Number" field to be easily calculated, then leave the Data Type as-is and simply apply the formatting you wish in the...
  15. J

    Subform requery problem

    Hello and Welcome! If "fra_sbfrm_ClientSearch" is actually a subform control on your main form, then try: Me!fra_sbfrm_ClientSearch.Form.Requery HTH, John
  16. J

    Filling tables from other tables

    It should be noted that there is a functional difference between the above quoted formula and this:=DLookUp("[start date]", "[table 1]", "[table 1].[WorkOrderNumber]=" & Forms!formname!txtboxWorkOrderNumber)The first example will not update with immediate results should you change the value in...
  17. J

    QueryDef Date Between problem

    You're trying to do too much. Your Parameter can only hold values, it can't perform operations like a WHERE clause, which is how you've set it up. Break up your expression into 2 Parameter values first: qdf.[Forms!frmSwictboard!frmDatabaseReports!txtStartDate] =...
  18. J

    Basic Select Case Statement not working?

    NP - best wishes for your project!
  19. J

    Attn jjturner

    Kirk, Here's a thread listing the code equivalents of some of the Startup options, including "AllowShortcutMenus" (look for the post from Gemma-the-Husky). Also, you needn't address me personally with your post - there are plenty of people here more than capable of answering your question and...
  20. J

    Basic Select Case Statement not working?

    Hi Jason, Firstly, in order to avoid confusion between Fields (in your table) and Controls (on your form) you should give your Controls a different name than your corresponding Fields (used as the Controls' "Control Source"). Once you have that sorted out, then fix your Select Case statement...
Back
Top Bottom