Search results

  1. G

    Type mismatch between report control and table field

    Yep, PBoldy that is my experience. In the following code I am getting the error 'invalid use of Null'. Can anyone explain why? The field does have Null in it: With rs1 .Edit ![RacePosition] = CInt(Me.Position.Value) ![RaceCategory] = Me.Category ![RaceAge] =...
  2. G

    MessageBox

    Hi, I have a button which runs a macro which in turn runs 3 Update Queries to finalise a process and 'fix' the results. I just want a message at the front of the Macro offering the user the choice to continue or not. On the surface MessageBox seems the obvious answer but it doesn't seem to...
  3. G

    Type mismatch between report control and table field

    I took out the offending null field and it saved the rest of the data to the 'current' record including fields I was printing on the line as well as the hidden fields I created that were just marked as 'Not Visible'. Thanks again for all your help getting me back up to speed on Access after 15...
  4. G

    Type mismatch between report control and table field

    Hi, I have a report in which I want to save the data in a field on the report detail line which is numeric to a table field which is also numeric. Access is producing error 3164 which I assume is a type mismatch. Can someone tell me the function I need to use to convert the data in the report...
  5. G

    What Report level fields are available to the 'On Print' event

    thanks for the explanation Pat Hartman. I do like to know why things are happening. Makes it much easier to remember for next time. :)
  6. G

    What Report level fields are available to the 'On Print' event

    Hi All, thanks for the replys. AS I suspected, it's because on a report the Query fields are available to the Collection but not the OnPrint event unless explcitly declared as Minty above said to. Thanks for the feedback. BTW, me!RaceEventID doesn't work either. Thanks again S
  7. G

    What Report level fields are available to the 'On Print' event

    It's all referring to controls on the Report. The Me.RaceEventID field is on the query and is available to the collection within VBA as I can select it in VBA when I type me.etc . It is not explictly anywhere on the report yet hence my suspicion that I need to actually put it in the detail line...
  8. G

    What Report level fields are available to the 'On Print' event

    Hi, I have a query with a number of columns that aren't printed on the report line but that I was to save to table for each line on the report. In the 'On Print' event I can successfully pick up this particular field (Me.RaceEventID as it happens) from the drop down that appears so Access VBA...
  9. G

    Retrieve non-bound column from combo box in VBA

    Hi, Can anyone tell me how I refer to the non-bound column(s) of a COMBO box in VBA? The default Me.Field for example in a Report event would give me teh bound column value but if that field has a description associated with it how would I retrieve that? Many thanks Stephen
  10. G

    Refresh combo box on subform after insert

    Easy when you know how! Thanks a million.
  11. G

    Refresh combo box on subform after insert

    Hi, I have a subform where I am adding runners to a race. Sometimes the runner exists but sometimes the runner needs to be added first. I'm using the OnNotInList Event to fire up the AddRunner form, which works fine and adds the runner no problem. The trouble is that the combo box on the...
  12. G

    Select the Runners best time for a given race

    Sorry, I'm being an idiot. One of the problems having COMBO fields built into tables in access is that you are not necessarily seeing the actual data. It turns out that the RaceEvent field is unique and the '1' is from the linked table in the combo box not the actual underlying data. I'm still...
  13. G

    Select the Runners best time for a given race

    Hi, not sure what you mean? I would assume that it would group by RaceEvent and RaceRunner and select the MIN value if there are multiple entries. The MIN option isn't doing anything. If I take it out I get the same results set. So that was why I tried the JOIN sub-select query. Canyou go...
  14. G

    Select the Runners best time for a given race

    Thanks. I did that as that was what I thought the min function would do but it returns all the times for each race/runner combination not the MIN. Hence trying something different. No idea why the MIN function returns all records? RaceEvent RaceRunner MinOfRaceTimeSecs 1 Alan 1819 1 Alan 1862...
  15. G

    Select the Runners best time for a given race

    Hi, Yes, it's a composite primary key. The R is the alias because I'm referring to the table twice so it would be unreadable without it. Put in 'AS R' if that's clearer. The SELECT statement runs fine on its own. A runner has run a race, say, 4 times and I want to know his fastest time for that...
  16. G

    Select the Runners best time for a given race

    Hi Guys, The 'R' is a way of giving a table name an alias so that's a red herring. The first select statement works no problem. Re the table structure, the primary key is Raceevent and Racerunner. Each runner can run each event mulitple times (imagine a Saturday park run) but I want to see...
  17. G

    Select the Runners best time for a given race

    Hi, I have a table RaceEventRunners and I want to select the runner's best time for a given race. I have written the following nested SQL but ACCESS returns 'Syntax error in join operation'. SELECT R.RaceEvent, R.RaceRunner, R.RaceTimeSecs, R.Racetime FROM (raceeventrunners R INNER JOIN...
  18. G

    Requerying Data in Combo box after adding a new record

    I'm using the Embedded Macro to first add the new runner and then requery the combo box on the subform before returning to it.
  19. G

    Requerying Data in Combo box after adding a new record

    Hi, Yes I'm requerying the combo box. I'm actioning the AddNew record by the OnNotInList event for the combo box. I successfully add the new record and in the same macro, requery the Combo box (I tried all the other Events such as OnDirty, OnChange etc but just got errors or the same result)...
  20. G

    Requerying Data in Combo box after adding a new record

    HI, I have a subform where users select a runner and post a time against the runner. If the runner is not in the Runner drop down I allow the user to add a new runner and return to the subform entry. I want the list now to contain the new record added but whatever I do the drop down list is...
Back
Top Bottom