Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 29th, 2004, 01:48 PM
robinfreyes robinfreyes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 robinfreyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old December 29th, 2004, 02:04 PM
robinfreyes robinfreyes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 robinfreyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #3  
Old December 29th, 2004, 05:47 PM
lwells lwells is offline
Contributing User
Dev Articles Novice (500 - 999 posts)
 
Join Date: Sep 2004
Posts: 632 lwells User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 21 h 59 m 38 sec
Reputation Power: 5
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.

Reply With Quote
  #4  
Old December 30th, 2004, 09:55 AM
robinfreyes robinfreyes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 3 robinfreyes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Control Source / Record Source issue


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT