hi,
Thanks for you help
hi,
Thanks for you help
I don't see that code anywhere in the VBA editor.
pbaldy,
I apologize, I have not been at work for a few days. I will attempt sending it again if necessary
The code is with the form part_details , the extra label test128 is just for test purposes
Option Compare Database
Private Sub Command23_Click()
On Error GoTo Err_Command23_Click
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
Exit_Command23_Click:
Exit Sub
Err_Command23_Click:
MsgBox Err.Description
Resume Exit_Command23_Click
End Sub
Private Sub Text128_AfterUpdate()
Me.Text128 = Me.Description.Column(1)
End Sub
Private Sub Form_Load()
End Sub
Private Sub Stock_Planning_Click()
On Error GoTo Err_Stock_Planning_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Stock Planning"
stLinkCriteria = "[Material]=" & "'" & Me![Material] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_Stock_Planning_Click:
Exit Sub
Err_Stock_Planning_Click:
MsgBox Err.Description
Resume Exit_Stock_Planning_Click
End Sub
Private Sub Command25_Click()
On Error GoTo Err_Command25_Click
DoCmd.Close
Exit_Command25_Click:
Exit Sub
Err_Command25_Click:
MsgBox Err.Description
Resume Exit_Command25_Click
End Sub
@welshmpf: What is the code trying to do here? I ask out of curiosity, because I am definitely not experienced with programming.
The code you have in the textbox would normally go in the after update event of the combo.
pbaldy, would a code similar to that work for my database as well?
Sure, I originally suggested it for yours.
You did, but with my little background in programming, I did not think the code would be longer than 3 lines.
welshmpf posted a lot of other code. The only sub doing what we were talking about is:
Private Sub Text128_AfterUpdate()
Me.Text128 = Me.Description.Column(1)
End Sub
Alright. I am pretty sure I am back in the game. The main mistake I can see that I made each time I tried this was that I dont think I ever put anything in the control source. I feel like that could have hurt me. I am playing with it now, and made a text box (text16).
In the VenderID after update I put that code in:
Me.Text16=Me.VenderID.Column(1)
Now it is reading off "#Name?"
I feel like this has a simple solution.
What's the control source of Text16? I'd expect it to be the name of a field in the form's record source.
Well, I put it in a field in a new table.
The table was Test, and the field was text16
I upped what I did by making two text boxes, (text26, and text24)
Here are their record sources, and the record source of the form:
text24: =[Table1]![test]
(table1) is the one I created that has only an auto-number and this field.
text26: =[Parts per order]![test]
sfrmPartsPerOrder: SELECT [qryPartsPerOrder].[Quantity], [qryPartsPerOrder].[JCS #], [qryPartsPerOrder].[VenderID], [qryPartsPerOrder].[Part ID], [qryPartsPerOrder].[Description], [qryPartsPerOrder].[PartCost], [qryPartsPerOrder].[ExtendedCost], [qryPartsPerOrder].[ExtendedSell] FROM qryPartsPerOrder;
I am going to try changin text26's to =[qryPartsPerOrder]![test]
Just tried it, and it still doesnt work...
Well, the field has to be in the form's record source, which "test" isn't. It would also just look like this in the property:
Quantity
So, If I try the same code and everything like that on lets say... partID, I should get what I'm looking for?
That also didnt work... but it also didnt fill in by row on the combobox. It filled in the entire column with the same info, which would mean that it would fill in the same thing for each partID. hmmmm. close, but no cigar.