On Mon, 8 Mar 2010 05:15:01 -0800, MarkyMark
<(E-Mail Removed)> wrote:
Speculating I think CurrentEventDate is a dropdown with runs. It
should have a first (likely hidden) column of RunID, BoundColumn set
to 1, and one or more additional visible columns (RunName, RunDate).
If that's correct the line of code should be:
rst!RunID = Me.CurrentEventDate
The bigger question is why you are doing this unbound. Access works
great in bound scenarios, without the need to write code.
-Tom.
Microsoft Access MVP
>This may be covered elsewhere, but my understanding of how to phrase the
>question is limited at best.
>
>To set the scene - this is a dB for a weekly running club.
>
>I have a table "RunDetails" (holds details of runners in an event) which has
>a lookup field (the date) bound to table "Runs" (details of the event itself).
>
>Form PersData displays the details of runners (name, etc). On this form I
>have two unbound texboxes (Bib and Distance) and a date combobox
>(cbo.rowsource is query from table 'Runs') and a button to enter their ID,
>and the contents of these unbound boxes into table RunDetails.
>
>The only thing that doesn't work is transferring the combobox date into
>rundetails as I get a "13- type mismatch" error. I suspect that I am not
>referencing the query correctly:
>
>rst.AddNew
>rst!RunnerID = IDRef
>rst!RunnerBib = Me.EventBibNo
>rst!RunnerDistance = Me.EventDistance
>rst!RunID = Me.CurrentEventDate!RunID 'This is the bit thats wrong!
>
>Can anyone offer some guidance?
|