Unanswered: if fields not null other fields insert into
I have a table name is "customers"
id: Auto number
Customer : Text
2smny : Number
And i have a field and a save button on the form, field name is smny;
I want insert into smny value in the customers table but if 1smny not null then 2smny or i can tell i want insert into at first null smny fileds on the customers table..
Edit: Sorry not insert into, i want update set... Because not new record only update null fields.
Yes i know and i understand you , you're right but i can't.... and i did mistake my first question.. So how can i update null field, for example if not null 1. field then i will update 2. field
1 and 2. field is not null then i will update 3. fileds. Only null field..
Dim rs As DAO.Recordset
Dim bbsql As String
On Error Resume Next
bbsql = "SELECT * FROM customers"
Set rs = CurrentDb.OpenRecordset(bbsql)
For i = 1 To 23 'for 1spny, 2spny,....,23spny
Do Until rs.EOF
If IsNull(i & "spny") Then
rs.Fields(i & "spny") = Me.text10 ' text10 is field name on the form
But i can't .. Maybe u don't understand to me because my English very bad