Command Buttons in Forms and alot more

brian0721

Registered User.
Local time
Today, 22:59
Joined
Dec 5, 2001
Messages
103
Okay, im not really all that experienced with access, so this might be easy for everybody else, but here goes. I made a database for my boss at work. We store loan information, names, amounts, addresses, etc. In it, I have a report that will take the name, address, etc, and put it into a letter and print. Here is my problem, once we start having more than one name in the database, it wont print properly, because it is seeing more than one name in each field. How do i go about making it so that i can pick a certain name and then make the report use that information. Can i make a drop down list with the client names that automatically updates, and then will print a report for THAT SPECIFIC person? Any help would be greatly appreciated. This is very important.

Okay, first of all, thanks for the help so far. I am getting somewhere without error messages now atleast, but still not where i am trying to get. Here is what I have as far as objects go. (keep in mind this is not the database i am using, i am just trying to figure it out using this test db. I have a TABLE called "Main", I have a FORM called "Main F", I have REPORTS called "Main R" and "Test." When I put in that code that you gave me earlier, I made it so that it said... "
Private Sub Command15_Click()
DoCmd.OpenReport "Main R", , , "[TEST] = " & Me.Combo12
End Sub

When I click the button it brings up a dialog box wanting me to enter a parameter value for "TEST" It then asks for a parameter value for the Loan number that I am on. I am confused, but not surprised, because I do not know that much about this kind of stuff. Anyways, any more help would be greatly appreciated. If you want, I could email you this db and you could see what I have going. Thanks again!
 
A couple of thoughts on the problems you discussed, first with the report printing problem, were you putting all of you report output fields in the header section of the report and not in the detail section?

You can do what you want with picking a certain person from a combo box. Here is how I would do it. In your customer table have fields for CustomerID, FirstName, MiddleInitial, LastName, along with all of the other customer info in other fields. Create a query including the CustomerID field and a field containing a directory style concatenation of the 3 name fields. Like this:

[LastName] & ", " & [FirstName] & " " & [MiddleInitial]

These would be the only two fields in the query. Make this query the recordsource for your combo box, make the the CustomerID field the bound column of the combo (0), set the column widths property as 0, 2. Then in the OpenReport statement include CustomerID = Me!CustomerCombo (or whatever name you have given the combo).

HTH
 

Users who are viewing this thread

Back
Top Bottom