ID and not name in displaying report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When i try to print a report from a combo box it displays the ID and not the name, my table has two cols ID and Name, grabs the correct info on the form but when displaying into the report the ID nums display. I know it has something to do with the lookup? How do i resolve this problem.

Thanks in advance
 
G said:
When i try to print a report from a combo box it displays the ID and not the name, my table has two cols ID and Name, grabs the correct info on the form but when displaying into the report the ID nums display. I know it has something to do with the lookup? How do i resolve this problem.


Create a query that Joins the two tables, then use the query
for the report's record source.
 
sorry but i don't quite understand what you are trying to instruct, i have two synchronizing combo boxes. the second box displays the proper text onto my report, but the first one displays the the ID number and not the name, again i'm using one table which has two columns ID and Name.
 
G said:
sorry but i don't quite understand what you are trying to instruct, i have two synchronizing combo boxes. the second box displays the proper text onto my report, but the first one displays the the ID number and not the name, again i'm using one table which has two columns ID and Name.


I sounds more like you have three tables. The main table
that the form and report are based on as well as two lookup
tables. one for each combo.

The report's record source query should include all three
tables linked on their relate ID fields. This will allow
you to include the names in the query so the report doesn't
have to worry about it.

If I'v completely missed the boat here, post back with ahe
names of the tables, their fields and a short description of
each field.
 
Hi Marshall thanks for all your help.
I currently have a table with all the required fields to be stored at Support table(for my record source)
like i mentioned b4 everything gets stored correctly except that instead of storing the name, the id gets stored. my first table Trial include the ID and name of fields for the first combo box, the second table includes 3 cols, corresponding to an ID field, name and another text field that connects with the first one to synchronize the combo boxes. I am aware that I have to have a query that joins the tables and that calls for the name instead of the id, but i have how to do it. does this make sence???
 
G said:
I currently have a table with all the required fields to be stored at Support table(for my record source)
like i mentioned b4 everything gets stored correctly except that instead of storing the name, the id gets stored. my first table Trial include the ID and name of fields for the first combo box, the second table includes 3 cols, corresponding to an ID field, name and another text field that connects with the first one to synchronize the combo boxes. I am aware that I have to have a query that joins the tables and that calls for the name instead of the id, but i have how to do it. does this make sence???


Create a new query. Add both tables to the query and check
that the connecting line is between the proper fields. If
there is no connecting line drag the id field from one table
to its corresponding field in the other table.

Drag the name from the lookup table down to the field list.
Switch the query to sheet view to see if it contains the
needed data. If not switch back to design view and fix it.
 
I am so sorry but I think my brain is not functioning properly, My form depends on quite a few queries and tables, like I mentioned b4 everything gets stored in my Support table.
This shouldn't be a problem right? B/c when I tried to make the query and add all the queries and tables, the wizard didn't allow it.
 
G said:
I am so sorry but I think my brain is not functioning properly, My form depends on quite a few queries and tables, like I mentioned b4 everything gets stored in my Support table.
This shouldn't be a problem right? B/c when I tried to make the query and add all the queries and tables, the wizard didn't allow it.


Wizard? What wizard?

Maybe we're having a terminology conflict here, but I really
can't follow what you're trying to tell me.

Let's back up and start with just the tables, their
important fields, field type and the meaning of each field.
Then explain how these tables and fields are used in the
form and the report.
 
Ok.
I have a form, that has 3 synchronizing combo boxes, and a few text boxes along with it.
I am dumping the data entry into a table. So far all the information inputs correctly into the table except the first combo box that instead of storing a text , it stores the ID.
For the first combo box a table gets called in the rowsource, for the second and third combo box a query gets called in the rowsource. In my Record source of the form I call the table that I want all the data entry to be stored in. You suggested that I write a query for that, which I am not really sure on how to do it. Do I make sence
Again thanks for all your help!
 
G said:
Ok.
I have a form, that has 3 synchronizing combo boxes,
and a few text boxes along with it.

I am dumping the data entry into a table. So far all the
information inputs correctly into the table except the
first combo box that instead of storing a text , it stores
the ID.

For the first combo box a table gets called in the
rowsource, for the second and third combo box a query
gets called in the rowsource. In my Record source of the
form I call the table that I want all the data entry to be
stored in. You suggested that I write a query for that,
which I am not really sure on how to do it. Do I make
sence?


I asked you to explain the tables and their fields too. I
really can't tell how to write the query until I know what
data you have to work with.

Sometimes, the critical parts of a data structure can be
inferred from a form descri[tion, but in this case, it seems
as if thats just causing more confusion. For instance, the
form is bound to the Support table through its RecordSource
property, right? What type of field is each of the combo
boxes bound to in this table? Are they ID numbers, Text
strings or, heaven forbid, Lookup fields? I beginning to
suspect that the problematic field is a Lookup and that's
where all the problems originate.

In addition, you said that one of the combo boxes uses a
table in its RowSource. What is this table? I presume that
it has at least an number field as the record ID and another
field with a descriptive Text string or name. In the combo
box on the form, generally the ID field is the bound column
but the name column has the first non-zero column width. is
that right? If you'd tell me the name of the table and each
of its important fields, we could talk about them more
precisely without all this rambling narrative.

Back to the report. When I said to create a query with both
tables, I meant the Support table and the table used in the
problematic combo box. The connecting line should have one
end at the Support table field bound to the combo box in the
form and the other end at the ID number field in whatever
you're calling the table used in the combo box. From what I
think I've gathered so far, those are the only two tables
required to make the report work as required.
 
the tables mainly consists of the ID - the data type being autonumber and the name, data type being text. You are right when you say that the problem has to do with the look up field.
 
G said:
the tables mainly consists of the ID - the data type being autonumber and the name, data type being text. You are right when you say that the problem has to do with the look up field.


Is it really a Lookup FIELD in the TABLE? If so, you've
been led down the garden path into the land of total
confusion. Those bleeping things so totally obscure what's
really happening that you end up with the mistaken belief
that the name is actually in the table. Actually, what you
can't see is that the Lookup field is a funky combo box with
a row source to another table and the number you're seeing
in the report is the lookup field's bound column (the ID of
a record in the other table. Please do yourself (and the
rest of us) a favor and never, ever use a lookup field
again.

Let's try to create the query for the report without using a
wizard. Click on the Queries tab in database window, then
click on the New button. Instead of selecting a wizard,
just select Design View. When the Add Table list pops up,
add the Support table and the table that with the names you
want in the report, then close the Add Table window. Look
at the top portion of the query design grid, it should
display the field list for those two tables. There should
also be a line connecting the Support table lookup field to
the ID field in the other table. If not drag one field to
the other so the line does appear. Once you have done
that,drag the needed fields from the tables down the the
fields row in the lower portion of the window. Now switch
to datasheet view and the desired data should appear. Close
and save the query. Then use the query in the report's
record source.
 
Back
Top