Combo Box/Text Box

Stemdriller

Registered User.
Local time
Today, 22:24
Joined
May 29, 2008
Messages
187
Hi All

Having a bit of a brain block day.

A form with a Combo Box on where users can select a Contractor by surname. Once selected the text box carries the Contractors first name, which all works well.

But when I try and change the name in the TextBox it does not register in the tables.

I have done this before but cannot remember how??

Any help please??

Thanks

Gareth
 
Is this form directly linked to the Contractors table?
 
It sure is, that's what is confusing me
 
Is the Textbox bound to the First Name field?

What you're doing will most likely lead to confusion and erroneous data.
 
The form is bound to the table but is the control bound to the field? That was the question.
 
Sorry

Form is bound to table and textbox is bound to the field within that table
 
How are you populating the textbox? In what event? What's the code?
 
Hi

I have sorted it now, got the mojo back

If MsgBox("All changes have been saved", vbOKCancel) = vbOK Then

Dim curDb As Database
Dim rs As Recordset
Set curDb = CurrentDb
Set rs = curDb.OpenRecordset("tblContractor")

rs.FindFirst ("[Surname] = '" & Me![Combo18] & "'")
rs.Edit
If Not rs.EOF Then rs![FirstName] = Me.FirstName
rs.Update
DoCmd.Close acForm, "frmEditContractor", acSaveYes
Forms("frmMainMenu2").Visible = True

Else

End If

Thanks for trying to help. Very much appreciated.

Gareth:)
 

Users who are viewing this thread

Back
Top Bottom