Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding code???

Status
Not open for further replies.

darkhat01

IS-IT--Management
Apr 13, 2006
144
US
OK I think this is a VBA problem, but I don't know enough about VBA to fix it on my own.

I am going to start with the problem that I am having.

I have a checkbox that has a grayed out box inside of it in a sub form. I looked up the record and there should be a checkmark in the box. (In the table it is set to have one.)

I'm getting an error message on the checkbox in Access that states "control can't be edited; it's bound to unknown field 'ABC1'."

Now this field does exist in the right table and the field is bound to the table/field, and there is no space before or after the ABC1.

So this is why it is grayed out, because the system is setting it to null can’t find it.

I know that in the preferences if Enables is set to No then all of the check box is grayed out, But in my case it is only the inner part of the box that is gray…. (And it is a Checkbox…)

I did not think it had anything to do with the code but, now I think it does.... Reason why:

I was look at the code and found that in two places there were a spots that everything was reading to a strNewRecord, but the ABC1 field.

Now I am new to VBA and need things explained as if I was in second grade, but how do I add this in to the code so it is initialized or added in to the string?

I tried it and I got an error on the line:

Me.RecordSource = strNewRecord (have no idea what this means other then it is coping the strNewRecord into a new value)


Anyone have any ideas?

Thanks,

Darkhat01
 
Find out what is in strNewRecord by searching your code and post the answer, please.
 

Please note: This problem was originally posted here, as "Weird problem with check box" on the Access Forms side.

The Missinglinq

Richmond, Virginia

There's ALWAYS more than one way to skin a cat!
 
What you need to give us is the code that sets up strNewRecord, look for code that contains:

strNewRecord =

There will probably be some sort of SQL statement in quotes after the =, something like:

"SELECT Field1, Field2 FROM SomeTable"
 
First off I would like to thank everyone that responded to this thread.

A special thanks goes out to missinglinq on the other Fourm.

JoeAtWork I found that the problem was located in that area.

Everything you all suggested got me closer to figuring it out what was going on.

The resolution: It was the code. The person that added the ABC field did not add any code in for it. As I am, she was new to Access.

Thank you so much,

Darkhat01
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top