![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
So I have a text box with a string in it, and I want to get the value in that text box into a table using VBA but I have no idea how to do that. Anyone offer any help? Thanks in advance! |
#3
| |||
| |||
|
|
Zachary wrote: So I have a text box with a string in it, and I want to get the value in that text box into a table using VBA but I have no idea how to do that. Anyone offer any help? Thanks in advance! Look at AddNew method in help. (some other topics include OpenRecordset, Update, FindFirst, and later on Edit). Of course, you could also use an Append or Update query. Since you specified VBA, see Execute in help as well if you want to use a query. Perhapshttp://www.youtube.com/watch?v=WaCK34LmvTE |
#4
| |||
| |||
|
#5
| |||
| |||
|
#6
| |||
| |||
|
|
If I understand you, I think that you're trying to do something like: * * Dim i As Integer * * Dim Cadena As String * * Dim Valor As String * * If IsNull(Me.textbox) Then Exit Sub * * Cadena = Me.textbox.Value * * DoCmd.SetWarnings False * * For i = 1 To Len(Cadena) * * * * Valor = "" * * * * Do While (Mid(Cadena, i, 1) <> ",") And i < Len(Cadena) * * * * * * Valor = Valor & Mid(Cadena, i, 1) * * * * * * i = i + 1 * * * * Loop * * * * DoCmd.RunSQL("INSERT INTO 'tabla' ('Columna') VALUES ("& Valor &");") * * Next i * * DoCmd.SetWarnings True |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |