control can't be edited

S

SUZYQ

I have an unbound form with unbound controls on it. I set the record
source at runtime (on the open form event) with the following syntax:

strSQLMain = "select * from tblMail " & _
"where EnteredDt = #" & Date & "# and EnteredBy = '" &
fOSUserName & "';"

Me.RecordSource = strSQLMain

I then set the control source for each of the controls on the form with
the following syntax (where Barcode and RecdDt are the names of fields
in tblMail):

Me.txtBarcode.ControlSource = "=Barcode"
Me.txtRecdDt.ControlSource = "=RecdDt"

Visually this is working great (i.e. if I have 3 records I've entered
for the day, I can see all three and use the navigation buttons to move
between them). However, when I try to edit the value in the control I
am unable to do so, and see a message at the bottom that says: "Control
can't be edited; it's bound to the expression 'Barcode'."

Please help.
 
V

Van T. Dinh

Try:

Me.txtBarcode.ControlSource = "Barcode"
Me.txtRecdDt.ControlSource = "RecdDt"
 

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