need help with school assignment on access!!!!!! please!!!!??

  • Thread starter Thread starter MandaMarie
  • Start date Start date
M

MandaMarie

Guest
Please help me!!!! I have a database I am working with and we need to create a report. In the report we only need one field for the address that on one line has the street address and on the second line has the city, state, and zip code. I can get the street address to show up but not the city, state, and zip. The city, state, and zip are all separate fields in the table. How do I get them to show up all in the one field? I know I have to do a formula or expression or whatever. . . but what do I have to do??? Please help as soon as possible! Thank you!!!!
 
I will probably not be much help at all, but I will take a shot in the dark. I looked in my beginners access book and it gives an example of how you can get things into one field.

The example it gives is if you have two seperate fields called FirstName and LastName. it says you can type:

Expr1: [FirstName]&" "&[LastName]

you would type this into the Field space (you know it has that list that says Field, Table, Sort, Show, Criteria...)

Apparently, because there is one space in between the quotation marks it puts a space in between the two names. So maybe you should experiment and see if you can find the thing you could put in between the quotes that would make it start a new line? I don't know what that would be...maybe hit return, or maybe there is a symbol for return?

Sorry, good luck with your assignment. Hopefully a senior member will come along after a while and know what to do.
 
The using the equation builder using the formula CONCATENATE() in a textbox.
 
i tried these

i tried these and it still does not work. . .:(
 
School assignment

Dear MandaMarie,

Try following these instructions. I got them right out of the MS Access 97 help menu.

Combine text values from multiple fields on a form or report

1 Open the form in Design view or the report in Design view.
2 Add a calculated text box for the fields you want to combine.

How?

3 To display the property sheet, make sure the text box is selected, and then click Properties on the toolbar.
4 Do one of the following:

· In the ControlSource property box, type an expression that combines the appropriate fields.
· Click the Build button to use the Expression Builder to create the expression.

For example, to return an address like

507 20th Ave. E., Seattle WA 98122

type this expression:

=[Address] & ", " & [City] & " " & [Region] & " " & [PostalCode]


Good luck with your assignment, I hope this helps.

Charlie
 
i tried that but. . .

when i try to run it, it asks me for a parameter value! what in the world is that? :mad: :(
 
I am not sure. It might be that you have a field in your expression that is not in your table. I don't know whether you are using the exact expression I showed you or not. In any case replace all of the fields in brackets [ ] with the fields in your table. Such as if your address field is different from the address field in the example, change it to what it is in your table and get rid of any other fields that don't match. You can also go into the help menu and read about using fields together. Hope this helps.
 
Is your report bound to the table or query that contains the fields?
 
I did this and it works.

Add a Text Box (which ever is best for you) to your report. Click Properties for that object and next to Control Source type something like this:

=[City] & "," & [State] & "," & " " & [Zip]
or whatever your field names are in the table.

and when you preview the report you will see
City, State Zip
 

Users who are viewing this thread

Back
Top Bottom