By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Noob help

P: 22
Sorry if this is a stupid question but ive been struggling with this for a little while now. I am trying to get a text box on a form to display a text value according to which record is selected using a query:

Open the form with appropriate record:

Private Sub butCreateOrder_Click()
Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmOrderDetail"

DoCmd.OpenForm stDocName, , , stLinkCriteria
Forms!frmOrderDetail.OrderSupplierid = Me!supplierid
End Sub

Ive tried this in the textbox control source and using vb code with no luck:

SELECT [suppliervendornumber] FROM suppliers WHERE [OrderSupplierid] = suppliers.[supplierid]

Am I close or am i completely off track here??
May 2 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.