April,
Many thanks for this. Will have a go and let you know how i get on!
K
"April" <April[ at ]discussions.microsoft.com> wrote in message news:D0B8F259-6FEB-4615-9B07-24AB4A8B3E4A[ at ]microsoft.com...
[Quoted Text] > Try using an SQL statement and the DoCmd.RunSQL to insert a new record > into > your table.. > > Dim sSQL As String > > sSQL = "INSERT INTO yourTableName ([Int],[SID])" & _ > "VALUES (1," & ValueFromForm & ");" > > DoCmd.RunSQL sSQL > > > > > "KAquestions" wrote: > >> Hi all, >> >> I have been working on various code combinations for this, but not >> getting >> anywhere. So was hoping someone could help. >> >> I have a form with 1 bound text box "SID" (PK and FKthroughout DB) and 4 >> unbound check boxes, and a button called "Confirm" >> >> What i want is when the user clicks "Confirm", if "CheckBox1" is ticked, >> add >> a record to a table "tbl2" with "SID" from for form going to "SID" in the >> table, and "Int" in the table becoming "1". >> >> Or else, if the user ticks "Checkbox2", "SID" goes into table, with "Int" >> becoming "2" >> >> The table design is just 2 fields >> >> SID >> Int >> >> Am i making sense? >> >> Can anyone help? >> >> K >> >> >>
|