Fields won't updated unless it is clicked on

David_P

Registered User.
Local time
Today, 03:19
Joined
Aug 17, 2010
Messages
30
I have created a form with some combo boxes to assign values to other boxes on the form. I can used the combo boxes to select the data I want
to get the Task Code field to updated when I selected the Task Name in the combo box.

I can't get the updated field (Lower right box) to update unless I click
on the Task Code box. It is the same for the other 2 boxes of Employee Number and Status).

http://img69.imageshack.us/img69/4639/screenshot2ap.jpg

When a Task Name is selcted, it is suppose to place the value it is
associated with from a table in the Task Code field and update the below field. But it only does this after I click on the Task Code field and I want/need it to do it automaticly after selecting the Task Name.

Thanks for your help.
 
1. Can't see your pics because you posted to a file sharing site which is blocked by my work. Just upload them here on the forum. see here for instructions.

2. I'm just guessing here because I can't see it but you may have to issue an explicit save ( If Me.Dirty Then Me.Dirty = False ) in the after update of the control.
 
So David - how are you putting the concatenated values into that text box? Is it by setting the control source or by using code?

One thing to note is that if you are using code to do something, the After Update event doesn't fire when something is updated by code and you would need to explicitly call that event.

If you still can't do it, perhaps you can upload a copy of the database (with bogus data of course) and we can take a look.
 
I am using a Function to put the concatenated value into the text box.

Public Function Joined_dbo_Checkpoints_BarCode(dbo_Checkpoints_BarCode_Task, dbo_Checkpoints_BarCode_Employee, dbo_Checkpoints_BarCode_Status) As Variant
'Joined_dbo_Checkpoints_BarCode = dbo_Checkpoints_BarCode_Task & dbo_Checkpoints_BarCode_Employee & dbo_Checkpoints_BarCode_Status
End Function

http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=33770&stc=1&d=1284753422

I don't have a copy of the database to send up because it uses external data to work with.

I was thinking of using DLookup as the Control for the Task Code box but can't get it to work. Here is the code I came up with

Formual works:
=DLookUp("[Task_Number]","Task_List","[Task_List_ID] = 10")

Formual doesn't work:
=DLookUp("[Task_Number]","Task_List","[Task_List_Name] =" & [Me].[dbo_Checkpoints_Name_Task])
 

Attachments

  • screenshot2a.jpg
    screenshot2a.jpg
    86.2 KB · Views: 217

Users who are viewing this thread

Back
Top Bottom