help with code for edit/no edit

P

Patrick

I think the error as something to do with this line of
code:
blshipped = [tblControlNoInfo]![Shipped]

Try changing-it to something like:
blshipped = rst.Fields("Shipped").Value

Hope this helps..
PAtrick
PS I don't use a lot of '!' in my VBA code, so perhaps
this line of code I gave ya means the exact same thing..
In this case sorry I couln't find a better solution to
your problem.
-----Original Message-----
Hi all,

I recieved some help in earlier post but I can't get this to work - I receive an error
Cannot find field |


routine on OnCurrent of Shipped form - I'm trying to read
a table to find if Shipped flag is true. If it is -
don't allow edits on the Shipping form (based on a
different table then where the shipped flag is set- not
sure if it matters)
Dim blShipped As Boolean
Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblControlNoInfo")


blshipped = [tblControlNoInfo]![Shipped]

If blShipped = True Then
Me.AllowEdits = False (me refers to the
shipping form, again, not based on tblControlInfo)
 

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