Combo Box Question

I have an Access Database with a form on it that has 3 combo boxes 1 Flex 
grid and 1 list box.  The combo boxes display specific data based on a user 
selection in the flex grid or the list box.  the flex grid shows current 
appointments and the list box shows cancelled appointments.  The combo boxes 
show the detail of the appointment.  If the user selects an item in the flex 
grid the combo boxes populate correctly if the user selects an item in the 
listbox the combo boxes error.  

Both click events use the same VBA Subroutine to populate the combo boxes 
using a recordset the only difference being the where clause of the SQL 
Statment populating the recordset.  

The error that comes up says The macro or function set to the BeforeUpdate 
or ValidationRule property for this field is preventing Scheduling from 
saving the data in the field.

The line of code that generates the error is
cboSurgeon.listindex = intidx

intidx is an integer field that passes the the ID of the selected item.

Any ideas would be appreciated.

0
Utf
1/9/2008 11:27:01 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
748 Views

Similar Articles

[PageSpeed] 35

Hi Ray,
Access is finding an error for the BeforeUpdate event of the form or the 
listbox or there is a validation rule on the field used for the listbox.
Comment out any code on the before update event for the listbox and run the 
form, see if the error appears.
If you have a validation rule in the table field for the field for the 
listbox, do a test with the validation rule removed to see if the error 
appears.
You may need to comment out the code on the form's before update event as a 
test, run the form, see if the error appears.

Jeanette Cunningham




"Ray Milhon" <RayMilhon@discussions.microsoft.com> wrote in message 
news:3E1D657F-67B4-45C9-8001-0BE821F68B29@microsoft.com...
>I have an Access Database with a form on it that has 3 combo boxes 1 Flex
> grid and 1 list box.  The combo boxes display specific data based on a 
> user
> selection in the flex grid or the list box.  the flex grid shows current
> appointments and the list box shows cancelled appointments.  The combo 
> boxes
> show the detail of the appointment.  If the user selects an item in the 
> flex
> grid the combo boxes populate correctly if the user selects an item in the
> listbox the combo boxes error.
>
> Both click events use the same VBA Subroutine to populate the combo boxes
> using a recordset the only difference being the where clause of the SQL
> Statment populating the recordset.
>
> The error that comes up says The macro or function set to the BeforeUpdate
> or ValidationRule property for this field is preventing Scheduling from
> saving the data in the field.
>
> The line of code that generates the error is
> cboSurgeon.listindex = intidx
>
> intidx is an integer field that passes the the ID of the selected item.
>
> Any ideas would be appreciated.
> 


0
Jeanette
1/10/2008 12:09:08 AM
Reply:

Similar Artilces:

List box
I am trying to use the list box function from the control toolbar. I am not sure how to get the listings I want in the list box. Is there certain VB coding that is needed? Any help will be appreciated. Thanks. Todd No VBA code needed. In Design mode, click on your list box and select Properties from the Control toolbox (or right-click your list box and select Properties), then scroll down to the ListFillRange Property and indicate the cell range address that has the items you want to appear in the box (i.e., A1:A10). Then exit out of design mode and test your list box. MRO "Tod...

CRM-SBS Install question
Question regarding installing MS CRM on SBS2K. On page 151 of Install Guide, "Add Microsoft CRM Accounts to Pre- Windows 2000 Compatible Access Group", I'm guessing that in the Members tab I just need to add the SBS server, right? Thanks, SD I never installed on SBS, however, when you install crm it creates a bunch of accounts in your active directory. 3 for every security role. They are under the name of the business unit you specified on installation. They could also mean these i think. BK "SeanD" <anonymous@discussions.microsoft.com> wrote in message ne...

Q98 to M03 conversion problems/questions
I am a long time Quicken user (~10 years) and am having a couple of strange problems converting my Q98 file to M03. I searched groups.google.com for newsgroup microsoft.public.money and read everything at http://umpmfaq.org before before posting here. I could not find anything on any of these issues. 1) Many of the quotes for one stock were not converted correctly. All of the prices prior to a 2:1 stock split for this particular stock have an "s" appended to the end of the price in M03. I checked all other stock's price histories in M03, but none of the other stocks...

how do i view different mail boxes
I have set up different email accounts in outlook 2000. How do I choose which mail box I view when I go to outlook? btoonhoule <btoonhoule@discussions.microsoft.com> wrote: > I have set up different email accounts in outlook 2000. How do I > choose which mail box I view when I go to outlook? Using IMO or C/W mode? -- Brian Tillman ...

Question about CListCtrl extended style
I have set the style: m_ListCtrl.SetExtendedStyle( LVS_EX_GRIDLINES | LVS_EX_CHECKBOXES ); What I want to get is: 1. when one item is selected, the check box should be checked; If one item is not selected, it should be unchecked. 2. If item is checked, it should be selected; if not checked, it should be unselected. How to do that? You will have to do this all yourself since that is not the default beheavor of a CListCtrl. The selection and checkboxs are normally independent of each other. But you can simply use a multi-select list control, and as the user checks or unchecks the checkb...

Concatenate Multi-Select List Box Items
I need to use the chosen items in a multi-select List Box as concatenated text in another control on a subform. This text will be part of a large amount of concatenated text. How do I do this? I did find info here about using such items in a query but it was way over my head and I couldn't figure out how to convert that idea to this issue so please don't just refer me to that w/o some other explanation for this novice. For example, if the user selects: Frt Bumper, Grille, & Headlamp in the List Box, I want to then somehow concatenate those selections into a sente...

Filtering a combo box using a combo box
All, I am trying to filter the records from a table displayed in a combo box using a combo box on the same form. I built a query and set the criteria as Me![FormName]![Combo_box]. This allowed me to filter the list, but it did not do exactly what I wanted. When the first combo box is blank, the second one is also blank. Is there anyway I can get the second combo box to display all of the records when the first box is blank? Thank you for your help. Regards, John Try a criteria in the second combo of: Like Forms!YourFormName!Combo1Name & "*" -- Arvin Meyer, MCP, MVP http:/...

Question for very smart Outlook users
Is there any way I can have Outlook e-mail my schedule (from the Outlook calendar) to an e-mail recepient automatically each day? Maybe, but that is the best answer you are going to get without posting some details, especially your Outlook version. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, BPra666 asked: | Is there any way I can have Outlook e-mail my schedule ...

Virtual pc 2004 question
I am installing the microsoft virtual pc 2004 and the service pack 1 for the first time and I am getting the following message: Virtual PC could not open the Virtual Machine Network Services driver. Access to the external network and host will be unavailable to all virtual machines using virtual networking. Virtual machines using virtual networking will still be able to access other virtual machines using virtual networking. To fix this problem, re-enable the Virtual Machine Network Services driver on one or more ethernet adapters or reinstall Virtual PC. I do not know what the Virtua...

colour change of dated box
How can I change the colour of a dated box of excel after the date is over. I want the programme to read date automatically from pc and change colour. try Conditional Formatting In 2003: 1. Select the cells you want to format 2. Choose Format, Conditional Formatting 3. Choose Cell Value Is from the first drop down 3. Choose Formula is from the first drop down 4. Choose less than 5. In the third box, enter =TODAY() 6. Click the Format button 7. Choose a color on the Patterns tab (or any available option) 7. Click OK twice. -- Hope this is helpful Appreciate that you provide your feedbac...

Combo Box on Forms
Hi, I am using a combo box on a form that has several items w/ one being Other. If the user selects other I want them to be able to input what they want so that it will go into the table instead of just the "Other". I just am not really sure on how to do that. Can you help? Thanks, Jaime In design view click on VIEW - Properties and the the combo. Then change Limit To List to No. -- KARL DEWEY Build a little - Test a little "jseger22@yahoo.com" wrote: > Hi, > > I am using a combo box on a form that has several items w/ one being > Other. If the use...

General Question
Is this the only way to get Outlook help without having to pay? There are lots of websites with information posted. http://www.slipstick.com for one. Of course there's always http://www.microsoft.com/outlook. And the online help files in Outlook. (Press F1) -- Aloha, -Ben- Ben M. Schorr, OneNote-MVP http://home.hawaii.rr.com/schorr **I apologize but I am unable to respond to direct requests for assistance. Please post questions and replies here in the newsgroup. Mahalo! "Amy" <anonymous@discussions.microsoft.com> wrote in message news:03c701c3a959$cafe41f0$a3012...

sent box
how do i get the emails in the sent box to show sent to instead of sent from? -- deb deb wrote: > how do i get the emails in the sent box to show sent to instead of sent from? Add/remove whatever columns you want. Right-click on the header row and select Field Chooser. i may have not explained myself too well i dont want to sort by the "to" column i want the header on the email to show "to" not "from" i think the problem might be that this is not the default sent file, its just a folder named "sent" its for my boss, he ha...

Exchange 2000 Question #2
I migrated my exchange server to new hardware recently. The process I followed was to add the new server to our site, move the mailboxes, rehome public folders, and then uninstall Exchange on the old server. After I uninstalled Exchange on the old server, Active Directory still lists the old server when I create a new user and get to the Exchange mailbox portion of the create user wizard. What do I need to do to eliminate references to the old server in AD? What did I miss? Jeff You can use ADSI Edit to delete the server object. You do this drilling down through the configuration cont...

Combo Boxes
Someone sent me an Excel document where each of the cells in I1:I312 are combo boxes. When you click off of those cells, the down arrow disappears. The list for the combo boxes are cells AA1 and AB1 (AA1 is New and AB1 is Existing). Please explain how this was done? Also, can you please tell me if it is possible to make New and Existing autocorrect entries. So even though the choices are New and Existing, if you hit N, New appears, and if you hit E, Existing appears. Thanks!! It sounds like Data|Validation. Take a look at Debra Dalgleish's site: http://www.contextures.com/xlDataVa...

Excel Question: How to Delete All Blank Rows from a worksheet?
Hi, I'm brand new, and that is my question. I just spent 2 hour laboriously mousing along deleting row by row, every other row thinkin there's gotta be a better way. (I could've done it of course if the were adjacent, but they were interspersed with my good data). I'm little behind the times: agile with keystrokes but less so with mous [think I was quicker in Lotus DOS! (actually "TWIN")]. But I do play mean piano -- Message posted from http://www.ExcelForum.com Check out: http://www.cpearson.com/excel/deleting.htm#DeleteBlankRows "DaveThePianoGuy >...

Separator in combo box
hi, Is it possible to have a line separator in a combo box? I mean something like a separator in menus? thanks, Behzad Try :- http://www.codeproject.com/combobox/zsepcmb.asp http://www.codeproject.com/combobox/customcombo.asp -- Regards, Nish [VC++ MVP] http://www.voidnish.com /* MVP tips tricks and essays web site */ http://blog.voidnish.com /* My blog on C++/CLI, MFC, Whidbey, CLR... */ "behzad" <b@b.com> wrote in message news:%23fVB3em5EHA.3368@TK2MSFTNGP10.phx.gbl... > hi, > Is it possible to have a line separator in a combo box? I mean something > like...

Edit box should support languages like japanese,chineese etc
Hi wht im trying to ask is.. 1. In my application, all the labels r in english only. 2.If i change the content of one text box in japanese or chineese language , [Text box value is the title for another dialog] 4.After i changed the content, i want the title to be displayed in japanese or chineese language. Note: I want only that text box to be changed ,,not the entire application.. so How can i able to support multibyte characters in MFC controls CEdit --text boxes.. Plz reply They do. You have to be in a Unicode app, and you have to have selected a Unicode font that has Chin...

Menu question
I wish to add a Tools menu (with menu items like Options ...) to both the CMDIFrameWnd menu and CMDIChildFrameWnd menu. I know I can duplicate the Tools menu in the two menu resources, but then I will have to memorize to synchronize the menu items. What I wonder is if I can create a third Tools menu resource and be able to insert the menu items to the CMDIFrameWnd/CMDIChildFramdWnd when needed? If not, then what is the ususal approach to solve this? Thanks in advance. Dave You could do this with AppendMenu or InsertMenu with a third resource, but if the contents of the Tools menu is go...

Text boxes on graphs
How do you make a text box hide the grid lines behind it on a graph? The grid lines are still visible and run through the text box, cluttering it up. Thanks right-click text box choose -- 'Format Text Box' from shortcut menu colors and lines tab change fill color to white Warm Regards, Crystal remote programming and training Access Basics 8-part free tutorial that covers essentials in Access http://www.AccessMVP.com/strive4peace * (: have an awesome day :) * Drew wrote: > How do you make a text box hide the grid lines behind it on a graph? The > grid line...

basic question
get guys, nice to be here... my question is a rather simple one, I thought I could figure it out bu I cant... ok... often, for homework, our teacher will assign tasks on excel. We do the work (math) and email it to her. Now, I believe the answers are encrypted ALREADY into the excel file All she does is enter a password to make them show... now.. I have this password, however, when I enter it, nothing really happens Are these cells hidden or.....??? I honestly cant believe she sits there and marks each of them, however when I enter the valid password, nothing is really showing up, ideas? Is th...

Quick question..
Our Exchange lab environment consists of three servers: One Exchange 2003 running on Windows 2003 (all service packs and updates). Two Windows 2003 DC's (all service packs and updates). One was an in-place upgrade from Win2k, the other was built from scratch. The domain is Ex2k3/Win2k3 native mode. Can i add an Exchange 2000 server to this environment now that the domain level has been raised and we're in 2k3 native mode? Thanks! jim Yes. Exchange native mode simply means no more Exchange 5.5 servers. -- Ben Winzenz Exchange MVP MessageOne "jim" <jim@NOSPAM...

Multiple Combo Boxes Highlighted
Hi, I have a problem with something in VB6. I have 4 combo boxes with individual names (not an array) located on an SSTab object. When I select another tab and then return to the tab these boxes are located on, each of them appears to be highlighted in blue. I add values to them only when loading the form so I'm at a loss as to why this happens ? Any ideas are greatly appreciated. Thanks, Jen. "Jennifer Ward" <jward@comcast.net> wrote in message news:eq5HrcBrKHA.6064@TK2MSFTNGP02.phx.gbl... > Hi, > > I have a problem with someth...

Multithreading Question
Hi, I am writing a multithreaded server application. I have written a class to handle thread(CThread , say) activities like creating, suspending, resuming threads etc. I have derived a class from CThread (CMainThread, say) and a class (CClientThread, say) to handle client connection which is also derived from CThread. In CMainThread class i am creating a thread and waiting for incomming connections. As soon as a connection came i am creating an object for CClientThread and call the function to create a thread and so on. code flow: 1. Start the main listening thread. 2. wait for a con...

MS CRM Certification question
Hi all, I have a question regarding the CRM certification? What, if any, certifications are there available with MS CRM? Is there anything like CRM Professional? Have I earned any certification if I passed the Applications Professional exam? T.I.A -- Kuba Skalbania [MCAD] ...