Mail Merge problem

Mandle

New member
Local time
Today, 05:13
Joined
Nov 17, 2009
Messages
6
Hi - sorry this is really basic. One of the tables in my db has 3 look up fields. These display as I want them to in the table, but if I use the fields in Mail Merge they appear as ID numbers. How do I fix this?:confused:
 
To overcome this problem, you will need to move these to lookup tables.
 
Thanks! But as I'm bit of novice could you explain how look up table works? For example, one of the fields is 'Item Description' which I was looking up from 'Products' table. What info do I need in each look up table and how do I use it?
 
Sorry about that - it was taking sooo long to load the reply that I hit the back button and started again - last reply put all three in! (Just take comfort from the fact that it's people like me who keep you in a job!!!) :D
 
Sorry about that - it was taking sooo long to load the reply that I hit the back button and started again - last reply put all three in! (Just take comfort from the fact that it's people like me who keep you in a job!!!) :D
You can use the Edit facility to tidy up your multiple posts! A job is something you are paid for. We don't get paid for answering your questions - we do it out of the goodness of our hearts.
 
Sorry Rabbie - I realise that - was just joking to cover up my ignorance! Anyway - could someone answer re look up tables, how you set them up etc? Many thanks
 
Anywhere you have a table level lookup, you need to create a new table, that table will have a minimum of two fields One will be an ID Field (auto number for preference) and be a Primary Key this is what you will store in your original table (in place of your table level lookup) as a Foreign Key, by creating these additional tables this way you are headed toward the light, down the road call Normalisation.
 
Hi - sorry was called away yesterday. Do you mind if I clarify this? I have for example Order Details Table with Customer id , Date, Product id, Quantity.
I then have Products Table with Product id, Description and Price. Obviously have Customer table with name adress etc. as well. Currently my look up fields are in the Order Details Table, where I 'look up' Customer and Product Description. I also use the 'Price' field in the Mail Merge as part of the invoice.
As I class these as my main tables, do I now create for example a further table with Customer id and Name and if so which of these two fields is the primary key and what way would I relate them to the main table? Sorry to be such a numpty about all this - I have been thinking about it so long I think my brain has gone numb.
 
If you already have those additional table, no you don't need to create duplicates.

What you need to do is (if we take your customer field for example);
  1. Add additional Field called CustomerID
  2. Populate this field with appropriate CustomerID's
  3. You could do this by hand if there is not too much data or create a query to do it for you.
  4. Delete existing Field that contains Table level lookups.
If you use correctly set up Combo Boxes there should be no further issues.
 
Thanks for that - you are a star! That seems to have sorted out the mail merge problem. What type of combo box would you recommend for the form design and what way should I set it up? My only concern would be not to create the same problem when entering data in the forms. Thanks again for your patience!
 
........

What type of combo box would you recommend for the form design and what way should I set it up?

...
Not quite sure what you mean here.

Any way I would set up the combo with Limit to List = Yes

Then in it's On Not In List event put the following or similar;
Code:
MsgBox "Double-click this field to add an entry to the list."
Response = acDataErrContinue

Then in the On Dbl Click event put the following;
Code:
    Dim lngcombo7 As Long

    If IsNull(Me![YourComboName]) Then
        Me![YourComboName].Text = ""
    Else
        lngcombo7 = Me![YourComboName]
        Me![YourComboName] = Null
    End If
    DoCmd.OpenForm "FRM_NameOfFormToAddNewValue", , , , , acDialog
    Me![YourComboName].Requery
    If lngcombo7 <> 0 Then Me![YourComboName] = lngcombo7
FRM_NameOfFormToAddNewValue will be a form that allows the addtion of new values to your Lookup Table.
 

Users who are viewing this thread

Back
Top Bottom