Problems with Combo Box

RamanathanN

New member
Local time
Today, 22:13
Joined
Aug 13, 2012
Messages
8
Hi All,

I have a table called staff, the table has following fields: Date, Staff name, Dept, Client Name, Location, Post code, Time In, Time Out. I am trying to create a simple diary system for each staff with clients they see. I have a form called Staff Diary, where I enter above details. Client name is base on a combo box. When I select the client name from the combo box its auto populate the location and post code.

I have a save button on the form, when i click the save button, combobox details are not saveed on the staff table. The fields "location" and "post code" unbound. could anyone help me please how to resolve this problem? Thank you.

Kind regards
Nathan.
 
Hi Paul,

Thank you for your reply. I already written these lines in the afterUpdate event. My problem is I can auto populate unbound fields on the staff_diary_entry form using the combo box. But i am not been able to save those data back to the staff table. I am using a "save" button on the form. I also tried using a bound combobox with bound fields, in this case the combo does not auto populate the form fields at all and not saving any data when I press the "save" button. Cpould you please help me? Thank you.

Kind regards
Nathan.
 
Did you see the second method to place the value in bound controls?
 
Hi Paul,

this is what I have written on the combo Box afterUpdate event:

Me.Client_Name = Me!Combo69.Column(1)
Me.Location = Me!Combo69.Column(2)
Me.Post_Code = Me!Combo69.Column(3)

When I press the "save" button it save all the form fields except "Location" and " Post Code". I can not figure it out why it is not saving the last two fields on the list. Please help!!. Thank you.

Kind regards
Nathan.
 
Okay does your Form have a SELECT statement that is the RECORD SOURCE for the Form? If the answer is yes,make sure that the Fields 'Postcode' and 'Location' are included..
 
Hi Paul,

I have selected all the table fields in the "Select" statement. Is there anything else i am doing wrong?

Thank you
Nathan.
 
Make Sure that the FieldName does not conflict with the Unbound Control name or LabelNames or something that have a similar name..
 
Hi Paul,

I just realised my form fields "Client Name", "Location" and "post Code" are bound Do I have them as Unbound?

Thank you
Nathan.
 

Users who are viewing this thread

Back
Top Bottom