|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Updating Database
I have a form that has a datacombo box on it and I have it setup with a list from a different table then the rest of the form I have it working and populating. What I need is when I make my selection I need the column in the main table to be updated with this new selection. Also when I go to the next record I need that field to be blank or contain the selection that has already been made. So what I need is the selection to be put in the correct column and stay there unless it is changed. below is the code used to populate the datacombobox.
Private Sub Populatecombobox1() 'Dim rscb As New Recordset 'On Error GoTo errorHandler 'Set rscb = New Recordset 'rscb.Open "Select TeamMember_ID,FName&' '&LName as UName from Team order by FName", conn, adOpenDynamic, adLockReadOnly If rscb.RecordCount > 0 Then With DataCombo1(0) .Text = rscb!FName Set .RowSource = rscb .DataMember = "Test" .DataField = "Analysis_Owner" .ListField = "FName" End With rscb.MoveFirst End If Set rscb = Nothing End Sub Thanks in advance for any help. |
|
#2
|
|||
|
|||
|
One way is to open the original table, and then before you update a field, compare the original value with the value being submitted.
If value submitted <> value original Then 'update database cause the value has changed End if. HTH
__________________
How can I soar like an eagle when I'm flying with turkey's? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Updating Database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|