Lock only updated record

L

Linda RQ

Hi Everyone,

Using Access 2003. I have a patient database. I will try to explain as
best I can but I don't know the object names etc very well so let me know
what else I need to give if the info makes no sense. I have a subform of
patient therapy that shows on a main form. There are several fields with
therapy detail on my subform that get filled out when a therapy is started.
When the therapy is ended, the end date field is filled in. I need to lock
one field (therapy type) once a therapy is selected. The therapy type field
is a combobox with a list to select from. I tried going into the form
properties and locking the record and not allowing edits but then I couldn't
enter an end date later. I tried going into the control for therapy type
and locking that which worked but then I coudn't add therapy type to a new
record.

Is there anyway without vb code that I can prevent the user from changing
just that item once it has been entered?

Thanks,
Linda
 
D

Daryl S

Linda -

Try something like this in the OnCurrent event for the form (use your
control name for cboName):

If me.cboName.column(0) is null then
Me.cboName.enabled = True
Else
Me.cboName.enabled = False
End If
 
L

Linda RQ

Thanks Daryl...but I said no VB code puleeze...but ok, I'll try <g>. I can
sort of see what that is saying. This is what I did. I clicked in the
corner of the subform in the design view of the form and pulled up the
properties. I clicked in the OnCurrent event and went into build and pasted
your code. I compiled then saved. When I opened up the form in form view I
got a debug error and the second line below "If Me.ThpyTypeID_fk.Column(0)
Is Null Then" is highlighted in yellow.

Private Sub Form_Current()
If Me.ThpyTypeID_fk.Column(0) Is Null Then
Me.ThpyTypeID_fk.Enabled = True
Else
Me.ThpyTypeID_fk.Enabled = False
End If
End Sub
 
R

Rob Parker

Hi Linda,

The syntax is wrong; the line should be:
....
If IsNull(Me.ThpyTypeID_fk.Column(0)) Then
....

HTH,

Rob
 
T

tom_willpa

high quality Soccer jerseys NBA Jersey tracksuit and jackets, GHD
hairstraightener supplier from www.willpa.com

Are you a Retail businessman who bother by the purchase price? China
Cheapest TOP wholesale website can help you

we are specialize in replica sport goods manufacturing in china, we can
offer you all kinds of soccer jersey, NBA jersey,shoes and so on. they are
the best brand replica goods whih are look the same as the original goods.
excellent quality and steady supply for them. we have been marketed in Europe
and American for 3 year. all the goods we offer are AAA quality. our soccer
jersey are Thailand style. If any goods you buy from my company have problem,
we will refund or resend them again. Most of ourProducts have no minimum
order requirements,soyou can shop retail goods at wholesale prices. if you
can buy more than 300usd. We offer free shipping. The more you buy the more
discount for you.

National soccer jerseys: http://www.willpa.com
Club soccer jerseys: http://www.willpa.com
NBA Jerseys: http://www.willpa.com
T-shirt and shirt: http://www.willpa.com
Tracksuit: http://www.willpa.com
Hoody & Jackets: http://www.willpa.com
UGG boots: http://www.willpa.com
Hair style: http://www.willpa.com
shopping Index: http://www.willpa.com

EMS shipping. 7days arrive, paypal accept

want more information pls contact us or check our website: www.willpa.com
 

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