Transferring a field from a form to a report

colmoore

Registered User.
Local time
Today, 22:10
Joined
Oct 20, 2004
Messages
34
Hi All,

I've attached a picture which shows the problem.

I need to know the expression required to transfer the name of a football team (selected on a form with a combo box) onto a report.

The teams all have ID numbers, and so far its the ID thats getting transferred, not the team name.

Any help is appreciated

Thanks

Colin
 

Attachments

  • problem.JPG
    problem.JPG
    62.3 KB · Views: 167
You have to account for the "columns" of data fields in your combo box. Check the Access help files for the Column Property. I suspect that the ID number is in the first column and the reference to the first column is (0) and the second column is (1), etc.
 
Last edited:
The data in the report comes from a query. (Right?)
You are storing these choices (made on the form) in a table. (Right?)
Make sure have the table of teams as part of your report's query...with a join between TeamID field in each table in the query. Now use the TeamName field for your report instead of the TeamID.
 
Hi

Sergeant,

Thanks for your help. I response to your reply:

I don't presenty have any record source specified on the report.

I DO have the selected teams stored in a table, as you supposed.

I'm afraid I don't get the part about how to transfer them.

The report is called RECEIPT
The form is called MAIN

The teams come from 7 tables (one for each division) Each team has an ID number.

Hope this helps you to explain to me the next step:)
 
All of your teams should be in one table, with an additional field "Division".

It is a LONG way from where you're at to where you *should* be if you want to build a db the right way.
Do you want to start over? ...Or do you want a bandaid to make the unbound report say what it says in the form's combo boxes?

The bandaid (plaster, if you will):
Report textbox control source...
=Forms!MyFormName!MyComboBox.Column(1)
 
Thanks!

Sergeant

Thanks for the "plaster"

It works fine now, doing exactly what I wanted. Basically what I'm trying to do is make the form print a receipt for the competitor to take away with him so he can remember which teams he selected.

I take your point about the structure of the database. For now it's doing what I need it to do, and its almost complete so I don't think altering the structure now will make much odds.

Thanks anyway for your help in solving this one.

BTW I'm very envious that you live near New York. I had a 4-day break in NYC in October and I loved it! Can't wait to go back.
 
I don't know if you noticed, but GHudson provided the solution right under your first post.

Yeah, it's a real TREAT living here in NJ!
I'd rather be back in the UK, though. (did 7 yrs at RAF bases)
Things that you can get there that we can't get here:
Good Beer (possible after a search)
Good Lamb (from NZ, but they raise it for the UK anyway)
Good Curry
Good Lamb Curry
Good Lamb Curry with Good Beer
Good Kebab
Good Pub
Good Kebab after being asked to leave a Good Pub
Pork Pies (good or bad)
Sausage Rolls (good or bad)
Lucozade
Heating in your house that doesn't make noise
etc...
 

Users who are viewing this thread

Back
Top Bottom