Philip said:
Just a quick look for now (more tomorrow) but I can see problems in your
tables, which aren't correctly "normalised". Table 1 (you could name
this better) has equip eng and equip sp, and so does Table 3. You
should store in Table 1 only the Equip-ID from Table 3. Same for
Problem, and probably same for Part (although I don't see a table for
Part). Part, in turn, would contain only a reference to the MFR table.
This sort of thing is vital if you're to have the flexibility you'll
need, and time spent getting this right will be repaid handsomely.
Phil
Linq's suggestion will certainly work, but may be ugly when printed,
especially where descriptions are lengthy.
It sounds as if you are printing the forms directly, instead of creating
a report - that's fine. You may need to set a filter on the form before
printing or you'll get all the records in the database, not just todays!
(Use the Filter-by-form button, built-in to Access and described in Help).
For your first issue (getting both languages to display when selection
is made in either language); I suggest you'd want your form based on
the Work Order table, which would have a field referencing a record in
the Equipment table, where all other Equipment details would be held.
When filling in the form, you're aiming to have just the ID entered into
the Work Order table.
You'd have two combo boxes, one for each language, probably
side-by-side. The RowSource for the English combo would be a query (or
SQL string) returning the EquipmentID and the
Equipment-Description-English from the Equipment table. The Bound
Column should be set at 1 (the ID field) and Column Widths set to
0cm;5cm - which would hide the ID value actually being stored and
display only the English description in the drop-down list. So far so
good - an English user could select the item from the descriptions, and
the combo would store the ID into the Work Order table.
You'd have an equivalent for the Spanish combo, with the RowSource set
to pick up the ID and the Spanish description; again, the Bound Column
would be 1 (to store only the ID) and the column widths would have the
first field set to 0cm so you don't see the ID, only the Spanish
description text.
The next trick is to have one combo update the other. That's quite
easy: you just configure the OnUpdate event for each control to Requery
the other combo. So, your Spanish chap picks out an Equipment item, and
the English combo immediately displays the corresponding English
description and vice versa.
To do this, click on the button at the end of the OnUpdate item under
the Events tab in the control's Properties sheet. Choose the Code
Builder, and if the control to be updated is named Equip_Sp_combo, you'd
insert the line into the prodecure:
Me!Equip_Sp_combo.Requery
If you haven't done this before, it's all much easier than it sounds,
but you do want to include some error-handling code, so you can track
down what's wrong if/when you see problems. Here's the error-handling
code from one of my command-buttons:
======================================
Private Sub Command_Next_Click()
On Error GoTo bust1
DoCmd.GoToRecord
Exit Sub
bust1:
MsgBox Err.Description, vbCritical, "Command_Next_Click()"
End Sub
======================================
If the instruction to go to the next record (DoCmd.GoToRecord) fails for
any reason, it pops up a Message Box with "Command_Next_Click()" in the
title, the Critical button and the system description of the particular
error in the body of the Message Box.
This might help on Combo boxes:
http://www.techonthenet.com/access/comboboxes/bind_index.php
as might this:
Phil