|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Control Source / Record Source issue
I have several checkboxes on a form that are bound. Whenever these checkboxes are clicked, they would update the database value. For some reason, I am not allowed to click on them anymore. It just says, "Field **** is based on an expression and can't be edited."
AllowEdits is set to True and I am sure the Control Source is set to a field and the Record Source is set to a query/table. Still doesn't work. Is there a table setting I have to make to link the controls to the table? Maybe I am overlooking something but it's very strange. This is quite an important problem as many people are not able to use an important part of the system right now. It's been hours and they are getting antsy... Please help it would be most appreciated. Thanks in advance. |
|
#2
|
|||
|
|||
|
Just a note: Now, there is a record viewer at the bottom (first, last, previous, next) which wasn't there before. The form I created only allows to view 1 contact at a time, so there should be no need for that viewer bar, but it's there now.
Also, this is someone elses code/project that I am working on which is why it may seem like I have no idea what's going on (I'm slowly catching on). I will keep posting notes as I come across them. Hopefully one of you reading will be able to help or at least post some comments to help me figure out where I'm going wrong. Thanks. |
|
#3
|
|||
|
|||
|
robinfreyes,
Take a look at the recordsource for your form. It is probably a query rather than a table that is constructed or joined in such a way as no editing is allowed. This is often the result of using cascading queries. (Creating one query with a criteria, and then another query based on that query with a different criteria). As far as the navigation buttons being displayed on the bottom of your form, just set the NavigationButtons property to No and that will remove the navigation bar. If you still have problems, post the sql from your recordsource of your form and I will help you get it corrected. |
|
#4
|
|||
|
|||
|
hey! thank you for replying! so nice of you to help out during the holidays when most people are out vacationing. luckily for the both of us though no more time will be wasted on this issue as i have already figured out what the problem was and can explain it to anyone else who may run into this error.
everything was working fine until i made a copy of a table in the db and deleted the original table (thinking all is well because if you make a copy of something then all should be well right? WRONG.) after i made the table copy, one of the forms in the ms access project (vba) started showing up as a blank form. this means that all the dropdowns, listboxes, textboxes, labels, etc. were basically invisible. and that of course leads to people not being able to use the program, leading to complaints going around that people can't access the database correctly. at the time, i was thinking since all these controls were bound to a record and a control source it had to be a problem with the query NOT returning records. that was not the case though as i found out the query was actually fine. it could've been the query though...do not forget to examine yours! after hours and hours of wondering what the problem would be, i retraced my steps of when the error started occurring and came back to the table copy i made. when i made a copy of the table, i had selected the data and structure to be replicated into the new table BUT (yes, always a but) not everything (about the structure at least) is actually copied. what was missing was the PRIMARY KEY! that's it!!! as soon as i set the ID field as a primary key (which i thought *would've* been copied over) the forms started working again. not exactly sure why that mattered but it's gotta have something to do with the record and control source needing unique IDs since the controls are bound to the recordsets. i didn't think this would be the solution but it is so if you run into this problem go check to make sure a primary key is defined...it just might be the fix you're looking for. |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > Control Source / Record Source issue |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|