Updateable checkbox

  • Thread starter Thread starter Hitesh Joshi
  • Start date Start date
H

Hitesh Joshi

Hi,

I have a simple form in front end Access 2003 and a table in back end
SQL 2k.

I have a col datatype bit in SQL table. When I try to display this
using checkbox on my form, I cannot update the data, i.e. doesn't
allow me to check or uncheck this box.
This is over ODBC. Any hints?

hj
 
I think know what is going on... I need to figoure out how I can make
the form updatable.

Right now I cannot do dataentry of any kinds.

hj
 
Do you have a primary key defined for the table in SQL Server?

ODBC renders all connections as read-only if there's no unique index.
 
Yes there is a PK.

hj

Do you have a primary key defined for the table in SQL Server?

ODBC renders all connections as read-only if there's no unique index.

--
Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
(no e-mails, please!)









- Show quoted text -
 
figured out.. doesn't make sense but I was pulling the data from a
query and table at the SQL backend had FK but somehow I could not do
the update... so now I am pulling the data directly from the table.

thanks,
hj
 
This is something interesting I want to try...

I have this checkbox field 9which is working on my form) based on that
checkbox, if that is checked then next field Branch should be
'disbaled' (or dimmed)
I guess have to learn vba
hj
 
here is the code I have but it does not work:

Private Sub BranchID_BeforeUpdate(Cancel As Integer)
If All_Branches.Value = 1 Then
BranchID.Enabled = False
Else
BranchID.Enabled = True
End Sub

hj
 
If you want to disable a text box based on whether a check box is checked or
not, you need to put the code in two places, the form's Current event and the
After Update event of the check box.

Me.Branch.Enabled = Not Me.Check9
 
Two problems. It is in the wrong event. It should be the After Upate. and a
check box will never = 1. It will be either -1 (True/Checked) or 0
(False/Not Checked)
 
Two problems. It is in the wrong event. It should be the After Upate. and a
check box will never = 1. It will be either -1 (True/Checked) or 0
(False/Not Checked)

Thank you, That worked.

hj
 
Back
Top