We help IT Professionals succeed at work.

form has checkboxes and when adding new record the checkbox is greyed out

racer53
racer53 asked
on
Medium Priority
445 Views
Last Modified: 2007-12-19
form has checkboxes and when adding new record the checkbox is greyed out  the other 198 records are ok and can be checked or unchecked. checked means yes. I thought it was working but when I went to add a new record in the form all my yes/no checkboxex were greyed out..Thanks for any info.

Richard(racer53)
Comment
Watch Question

Commented:
Hi Richard,

This sounds like your Check box is not Bound to a Table, if UnBound, then 1 change, changes all.

Hope this helps

jaffer

Author

Commented:
thanks Jaffer for the tip but I double checked the contol properties and all are bound.
Very strange. even if I go to the table and click to new record 199 then go to one of the checkboxes and click it the data base goes back to record 167.
When I made the yes/no the default lookup is checkbox.and if I go to any of the 198 records I can enter a check in any of the boxes and it works even in the form. but try and do a new record and all the yes/no checkboxes and yes/no comboboxes get greyed out so you can not use them.
It is more then likely something I have overlooked . I suppose I could use a drop list with the yes no choices..

Richard

Commented:
Richard
why don't you zip your mdb and email it to me, let me have a look at it.
click on my name to see my profile and my email.

jaffer

Author

Commented:
jjafferr

I believe the issue is too many controls. I have many checkboxes . If I make the form linked or subform it works. I ran performance and that was it concerns too many control .

Thanks for the help

Richard

Commented:
It makes no difference
if properly controlled to a table, then it should work.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
Thanks for the points and the grade Richard,
I wonder which one did you choose?
The easy way,
OR
the hard way?

jaffer

Author

Commented:
Jaffer

I am not sure if I fully understand the bound and Unbound. But I will study it some more and do and redo the database from start to finish to help me learn.
The form parts from the training would only work when the new record was saved (but still grey out) but worked correct? dosent matter I prefer the subform method.
Your example is the original way I was doing it but I had very difficult time getting the setup and look that you have so I went the otherway. Just yesterday I went back to trying the subform just as you recommended. It certainly did not look like yours. When you make your forms you do not use the wizard I bet.

Thanks again I am looking foward to analizing your database with the recommendations the VB code is not needed for the save button when using the subform I assume but would not hurt
Thanks again

Richard

Commented:
what I meant by Bound and UnBound:
If the Record exists in the Table, then Check boxes are Bound, thus can be ticked, However,
in your case, since the Records IS NOT saved yet in the Table, thats when you cannot use the check boxes, but,
once the Record is saved, then only these check boxes are located in the Table, thus can be ticked.

OK, another easier solution:
Lets keep your favorate Form as is (I you spent alot of time fine tunning it till you got where you are ;o) ),
Move Member's Current Status up before the Check boxes (it is required to save the Records),
Place the following in your VB:

Private Sub lblmemstand_LostFocus()
    DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
    Me.FIRST_RESPONSE = 0
End Sub

Thats it, your Form and the Check Boes will work once you fill this field and press on the TAB key.

Explaination:
1- Your Record in the 3 Tables have to be saved before you can use the Check boxes, and it requires lblmemstand field.
2- Once you press TAB, through VB, we issue the Save Record comman, then
3- We issue the [FIRST RESPONSE]=0 which means [FIRST RESPONSE] is UnChecked.

If you need help in doing what I told you here, then please do it within 30 minutes, otherwise,
IT'S PLAY TIME.

jaffer

Commented:
Richard
I have emailed you what's so called, version 2 (LOL, couldn't come with a better name),
it has the latest comment I posted above,
AND
A newer look for my suggested Form.

What I did is basically took out the border of the SubForm, so it looks like it is part of the main Form.

check it out.

jaffer
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.