Help Addnew add double record

M

MN

I have a button add record. When I click it it add some fields to first
record then some fields it add to another new record? It add field Ethnic to
a new record w/o the other fields ? Thanks in advance

Dim DB As DAO.Database
Dim RecS As DAO.Recordset
Set RecS = CurrentDb.OpenRecordset("Client", dbOpenDynaset, dbSeeChanges)

With RecS
.AddNew
!cln_lname = Me.lname
!cln_fname = Me.fname
!cln_mname = Me.mname
!cln_pname = Me.pname
!cln_DOB = Me.cln_DOB
!cln_addr1 = Me.addr1
!cln_addr2 = Me.addr2
Select Case Me.OptEthnic
Case 1
!cln_ethnic = 1
Case 2
!cln_ethnic = 2
Case 3
!cln_ethnic = 3
End Select
..Update
End With
 
M

MN

I have option checkbox, I want to add in table with 1 or nothing but it
alsway add to a new record ? Any advice? Thanks
If Me.OptR1.Value = True Then
!cln_amindian = 1
Else
!cln_amindian = ""
End If
If Me!OptR2.Value = True Then
!cln_asian = 1
Else
!cln_asian = ""
End If
If Me.OptR3.Value = True Then
!cln_black = 1
Else
!cln_black = ""
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top