VB Code - Company Records

monks89

Registered User.
Local time
Today, 12:02
Joined
Mar 26, 2009
Messages
19
Hi....I'm making a database for a company that needs one and through form design I have created 2 option buttons (the user can choose either one or the other) as well as a set of 20 check boxes (list of parts) that I'm having some issues with. I have the 2 option buttons set up and 14 of the check boxes set up.

Basically through a series of hidden fields on the form I used vb to have a text box that changes to either "Yes" or "No" based on whether or not the checkbox is checked or not. In turn, "Yes" or "No" appears on the table that the form is based off of.

However, when I test it it works perfectly, but subsequent entries result in exact same checkboxes being checked for each entry. I want each record to have the ability to have different boxes checked for the various jobs that the company wants to keep track of (i.e. different parts will be sent to different people based on their needs).

The same thing happens with the two option buttons as well.

Here is the link so you guys can download it and hopefully fix the issue.

Thanks in advance.

EDIT: 2003 version
 
Last edited:
I'll look at your file, but if a checkbox ticked on Record A makes the same checkboxes on all other records become ticked, the problem is that your controls are not bound to a field in the underlying table. This is normal behavior for unbound controls in Access.

Assendum: I can't look at your database, because the file is in Access 2007 format. You really need to make a note of this, in your post, when asking people to look at an attached db. The majority of people are still not running 2007, and downloading a file, especially by going to a commercial site, is a waste of their time.
 
Last edited:
I edited my post to include the 2003 version, thanks. Also, I believe your comment may have fixed it.
 
My guess was, indeed, correct! Your checkboxes don't have Control Sources, i.e. aren't bound to fields in your underlying table.

You have fields in your table that correspond to the checkboxes, but you have them defined as Text, and they should be defined as Datatype Yes/No.

ALso, you really need to name your table something other than Table! It's a Reserved Word and sure to confuse the Access Gnomes and cause you grief, sooner or later!
 
I've been trying to figure this out for about an hour.....is it possible to make it so that if either the dealer or end user option button is not selected when the form closes that the user is made aware before it actually closes.

In other words, if either dealer or end user is selected then it closes normally otherwise a vbYesNo comes up asking if they really want to close if no selection is made.

Thanks
 
Nevermind, I figured it out.....thanks for your help.
 

Users who are viewing this thread

Back
Top Bottom