L
lc
Forgot I had that bogus email address for groups other than Autodesk. I
changed it to the right one in case there's anything I can do for you guys.
I've fixed hundreds of models for the fella's in my group and been answering
questions for about 3 years, but can't think how I could be much help in
your fields. One never knows though. <G>
~Larry
changed it to the right one in case there's anything I can do for you guys.
I've fixed hundreds of models for the fella's in my group and been answering
questions for about 3 years, but can't think how I could be much help in
your fields. One never knows though. <G>
~Larry
Ken Snell said:OK - let me be sure that I understand what is to happen here.
1. You'll select an assembly code from a combo box (? lookup table ?).
You'll want the assembly number to be the next sequence number.
2. You'll select or enter an assembly name. You'll want the part number to
be the next sequence number.
OK so far?
If yes, then we can use the AfterUpdate event of the Assembly Code control
to put in the Assembly Number. Same type of approach for Assembly Name in
order to get Part Number.
To do this, open your form in design view. Click on the Properties icon on
the toolbar. In the Properties window, select Assembly Code from the
dropdown list at top of window. Then click on Event tab. Click in box next
to After Update, and then click on the three-little-dots box at far right of
that box. Select Code Builder from the next window.
You'll now be in Visual Basic Editor, and you should see three lines:
Private Sub Assembly_Code_AfterUpdate()
End Sub
with the cursor on that second, blank row.
In that second row, type these rows (substitute real names for "generic
names"):
Me.[Assembly Number].Value = Nz(DMax(("Generic Assembly Number
Name", _
"Generic Table Name", "[Generic Assembly Code Name]='" & _
Me.[Assembly Code].Value & "'"), 0) + 1
Do similar steps for the Assembly Name control, changing names as needed.
Save the changes, and close the VBE window.
This is just a guess, as I don't completely "see" your form's setup (control
names, field names, table names, control sources, etc.) in my head.
--
Ken Snell
<MS ACCESS MVP>
< snip >l said:Yes, I have a form to enter the data in, I'll list what I have below and the
source/desired source.
Labels:
Project Code:.........................Lookup Table
Project Number:.....................Manual Entry
Project Name:........................Manual Entry
Assembly Code:.....................Lookup Table
Assembly Number:.................Auto Next Number
Assembly Name:....................Manual Entry
Part Number:.........................Auto Next Number
Part Name:............................Manual Entry
Part Stock Code:...................Lookup Table
Stock Description:.................Lookup Table
Part Material Code:...............Lookup Table
Material Description:..............Lookup Table
Diameter:..............................Inventor OLE parameter from Excel
(hopefully)
Length:...................................Inventor OLE parameter from Excel
(hopefully)
Width:...................................Inventor OLE parameter from Excel
(hopefully)
Height:..................................Inventor OLE parameter from Excel
(hopefully)
Gage:....................................Inventor OLE parameter from Excel
(hopefully)
Linear Feet:...........................Inventor OLE parameter from Excel
(hopefully)
Square Feet:..........................Inventor OLE parameter from Excel
(hopefully)
Total Linear Feet:..................Inventor OLE parameter from Excel
(hopefully)
Total Square Feet:.................Inventor OLE parameter from Excel
(hopefully)
If I left something out please let me know. I think I understand about the
formula or code I guess is the proper term. Thanks for your patience.
~Larry