I have tried what you suggested but still no joy, this is what my cade looks
like.
Private Sub cmb_NewJob_Click()
On Error GoTo Err_cmb_NewJob_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Job subform"
stLinkCriteria = "[Job_No]=" & "'" & Me![Job_No] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria
'
Exit_cmb_NewJob_Click:
Exit Sub
Err_cmb_NewJob_Click:
MsgBox Err.Description
Resume Exit_cmb_NewJob_Click
End Sub
my Job_No on subform comes up blank every time!
"PC Datasheet" <sp**@nospam.spam> wrote in message
news:Sa*****************@newsread2.news.atl.earthl ink.net...
Add this line of code to your code that opens the subfrom after the
DoCmd.OpenForm:
Me!NameOfSubformControl![Job_No] = Me![Job_No]
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"home" <re**@telkomsa.net> wrote in message
news:bp**********@ctb-nnrp2.saix.net... I have a main form with customer information and a Job_No on it. I also
have a button to call a subform. How do I pupulate the Job_No into the
subform when it loads up. Thanks