Hi Everyone,
Does anyone have some ideas I could try?
I have a form that is used to enter new data. The form based of a query that uses 4 tables.
As a new record is added, I am trying to programmatically populate some fields so the user doesn't have to enter them.
I added this code into the Project field's OnClick event.
Private Sub ProjectID_Click()
Dim AddSupervisor As String
AddSupervior = DLookup("[Supervisor]", "Resource", "ResourceID = " & Forms!frmSummarizedRsrcData!ResourceID)
Me.Supervisor = AddSupervisor
End Sub
I am able to add a new record, but how can I get the value of Me.Supervisor to stay visible on the form? As soon as I enter a new record it no longer displays on the form. I got the value of the Resource field to stay visible my making its default value equal to a selected dropdown value. (I have a dialog box that allows users to select a resource from a dropdown list that will filter the contents of the form).
I'm attaching a screen shot of my form so you can get an idea of what I'm talking about...
Any suggestions are appreciated!
Thanks!
Lissa
Does anyone have some ideas I could try?
I have a form that is used to enter new data. The form based of a query that uses 4 tables.
As a new record is added, I am trying to programmatically populate some fields so the user doesn't have to enter them.
I added this code into the Project field's OnClick event.
Private Sub ProjectID_Click()
Dim AddSupervisor As String
AddSupervior = DLookup("[Supervisor]", "Resource", "ResourceID = " & Forms!frmSummarizedRsrcData!ResourceID)
Me.Supervisor = AddSupervisor
End Sub
I am able to add a new record, but how can I get the value of Me.Supervisor to stay visible on the form? As soon as I enter a new record it no longer displays on the form. I got the value of the Resource field to stay visible my making its default value equal to a selected dropdown value. (I have a dialog box that allows users to select a resource from a dropdown list that will filter the contents of the form).
I'm attaching a screen shot of my form so you can get an idea of what I'm talking about...
Any suggestions are appreciated!
Thanks!
Lissa