Listbox not populating every time

I have a form that has two listboxes.  Both listboxes are on frmAccount.

LISTBOX 1: Show investments inside an account
This listbox shows data from tblPositions (a linked csv txt file)
In the SQL of the listbox, I set the criteria of AccountNumber field of the 
table to equal Forms!frmAccount!AccNumber.

LISTBOX 2: Show transactions of an account
This listbox shows account transactions from tblTransactions (a linked csv 
txt file)
In the SQL of the listbox, I set the criteria of AccountNumber field of the 
table to equal Forms!frmAccount!AccNumber.

The idea of my SQL was to limit so that it only shows positions or 
transactions for the appropriate account number.  The first one seems to 
work fine each time I open the form.  For some reason, the second listbox 
almost always shows nothing... not even the headers (even when I know there 
are corresponding transactions for the account number).  The strange thing 
is that sometimes it works, and other times it won't.

I thought that maybe the listbox just wasn't getting the account number 
correctly so I tried refreshing the data.  When I did this, I get this error 
message:
"You cannot record your changes because a value you entered violates the 
settings defined for this table or list..."

I've never been too good with listboxes or SQL so I'm sorry if this is 
something obvious.  Thanks!!! 

0
Todd
2/29/2008 7:52:48 PM
access.formscoding 7493 articles. 0 followers. Follow

1 Replies
843 Views

Similar Articles

[PageSpeed] 22

Well, I figured out part of my problem I think.  A date field from my second 
listbox that wasn't working right is being imported incorrectly.  When I 
remove that field from the listbox, it works ok.  That'll lead me to problem 
#2:

A third party program creates my csv txt files that my Access database is 
importing.  It exports a date like this...
113007
This is the same as 11/30/2007.

So, my linked table is trying to convert 113007 into a date and doesn't know 
how apparently  Any ideas?  Thanks again!



"Todd" <tizzzz@hotmail.com> wrote in message 
news:B169DB9C-0B2C-4CA0-9556-8EFF8D040B8B@microsoft.com...
> I have a form that has two listboxes.  Both listboxes are on frmAccount.
>
> LISTBOX 1: Show investments inside an account
> This listbox shows data from tblPositions (a linked csv txt file)
> In the SQL of the listbox, I set the criteria of AccountNumber field of 
> the table to equal Forms!frmAccount!AccNumber.
>
> LISTBOX 2: Show transactions of an account
> This listbox shows account transactions from tblTransactions (a linked csv 
> txt file)
> In the SQL of the listbox, I set the criteria of AccountNumber field of 
> the table to equal Forms!frmAccount!AccNumber.
>
> The idea of my SQL was to limit so that it only shows positions or 
> transactions for the appropriate account number.  The first one seems to 
> work fine each time I open the form.  For some reason, the second listbox 
> almost always shows nothing... not even the headers (even when I know 
> there are corresponding transactions for the account number).  The strange 
> thing is that sometimes it works, and other times it won't.
>
> I thought that maybe the listbox just wasn't getting the account number 
> correctly so I tried refreshing the data.  When I did this, I get this 
> error message:
> "You cannot record your changes because a value you entered violates the 
> settings defined for this table or list..."
>
> I've never been too good with listboxes or SQL so I'm sorry if this is 
> something obvious.  Thanks!!! 

0
Todd
2/29/2008 8:03:40 PM
Reply:

Similar Artilces:

How to set the column title in a listbox from Excel
any help here? You can do it two ways. 1.) Include a header in your RowSource Range. 2.) You can put Lablels just above your ListBox to label your ListBox columns. Hope this helps! If so, let me know, click "YES" below. -- Cheers, Ryan "V Hoang" wrote: > any help here? If ColumnHeads is set to true in the properties window, then the header row should not be included in the RowSource or ListFill range. VBA will automatically include the row above the ListFill range as a header if the ColumnHeads property is set to true. "Ryan H&q...

Command button
[Excel 2003] I have command buttons on the userform which access other userforms (which drive the spreadsheet data entry) I have a listbox on the userform displaying a number. I would like to enter code into the command button activations such that if the number in the listbox does not equal the number stored within the code of the command button then a mesage box is displayed and the command button does not activate its sub routines. Can anyone help? Thanks, Roger Something like this: Option Explicit Public Property Get MayProceed() As Boolean Const M...

Unable to update free/busy time
Hi there, This morning I installed the Exchange 2000 post-sp3 rollup on our small business server. Since then users have been getting messages from Outlook saying that it can't update free/busy time on the server. Prior to installing the rollup we did not get the errors. I had a look at the event log on the server and it is filling up with EventID: 1546 errors, the description is: Workflow event sink error [event: OnSyncSave, URL: <file://./backofficestorage/test.com.au/Public Folders/NON_IPM_SUBTREE/SCHEDULE+ FREE BUSY/EX:_xF8FF_o=DSPACE_xF8FF_ou=first administrative group/USER-_xF8...

Run-time error '5'
Hello, I'm getting a weird error on one of our computers. As soon as I open Excel and click anywhere on the sheet, I get an error: Run-time error '5' Invalid procedure or call argument This is just a blank document, with no macros or VBA code. Why am I getting it? I would appreciate your help. Thank you, -- Peter Afonin Hi try removing all add-ins -- Regards Frank Kabel Frankfurt, Germany Peter Afonin wrote: > Hello, > > I'm getting a weird error on one of our computers. As soon as I open > Excel and click anywhere on the sheet, I get an error: > ...

Populate List Box
Need some ideas. I have a list box from which our clients will be able to select which form they want to preview or print. However, each client should only have selections available that apply specifically to their company. For example: Company A will require forms 1, 2, 3, 6 and 7 Company B will require forms 1, 6 and 7 Company C will require forms 4, 5 and 6 I have some code right now to handle a simple two form variation: If Forms("Main").Controls("Form1Req") = "Yes" and Forms("Main").Controls ("Form2Req") = "No" Then Me.L...

Total Minutes Worked Within IVR Timing
Hi, I need to figure out how many total minutes employee worked during the IVR Timing. Each employee works different shift and it can run overnight into next morning where there may be IVR coverage before employee logs out. IVR Timing is same for Saturday/Sunday and same from Monday to Friday. IVR Timing Table; data type is Date/Time but only Time is available because date should be same as the schedule date DayIs IVRStart IVRStop Sunday 10:00:00 AM 6:00:00 PM Monday 9:00:00 AM 9:00:00 PM Tuesday 9:00:00 AM 9:00:00 PM Wednesday 9:00:00 AM 9:00:00 PM Thursday 9:00:00 AM ...

include busy/free time from "other" (i.e. ics) calendars
Please see the following thread. Is this possible? Could it be added as a future enhancement request? https://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.calendaring&mid=d5f088c7-77a7-48c5-8a9b-a1955f90aacc&sloc=en-us ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and t...

total of a range of times
This should be simple for some of you, but not for me. I am a runner, I have 4 ind. cells w/my split times. How do I get a total for the tallied times. I'm far from being experienced but am trying to learn..any and all help will be much appreciated. Thanks, Roger Roger To help you in your quest to "try to learn" I will direct you to Chip Pearson's site so's you can learn just about all you'll ever need for Time Calculations. http://www.cpearson.com/excel/datetime.htm#AddingTimes Gord Dibben Excel MVP On Sat, 13 Nov 2004 15:19:02 -0800, "Roger WG" &...

Autoformat dates and times
Hi, I have a workbook with two columns. In the formula bar of one of the cells i have 2005040101700 (YearMonthDateHoursMinutes), but what shows in the cell is 2.00504E+11 When I try to format the cell as yyyymmddhhmm I get ########### and when I put the cursor over the cell with ############### it says that negative dates and times are shown this way. How can I make this work? Thanks. Allison Allison, I'm hoping that your actual value is different: 2005040101700 doesn't make sense: year 2005 month 04 day 01 hour 01 minutes 70 seconds 0 Perhaps it's really 200504010...

Why does Outlook's message recall feature work sometimes but not all the time?
Basically my users have a problem with message recall. The problem is sometimes it works but most of the time it doesn't. Even more frustrating is when they get a successful recall notification message and then they get a reply to the message that was supposedly recalled successfully! Can anyone give me a straight answer or point me in the direction of a reliable article on message recall. www.winnetmag.com has an article that you have to pay for and Microsoft just explains how to use it. Thanks in advance, Chet Senior Customer Support Specialist Message recall is really unr...

Publisher 2007 will not open my old files
What to do? All of a sudden, my Publisher 2007 will not open any of my publisher files, even others done in publisher 2007. It crashes EVERY TIME. I have run Office Diagnostics twice, with no result. I have uninstalled and reinstalled Office 2007 TWICE, still no change. Do I just abandon it and go back to Publisher 2003? I've run virus scans, defragged, tried other versions of these files, tried files done by others - NOTHING works. it will start a new project, but will not open an old project without crashing. Can I install Publisher 2003 and use it even though I have Office ...

Downloaded transactions must be re-accepted every time
I bought Money 2005 last week and got it all set up. But when I turned on the auto-reconcile downloaded transactions option, I found that every transaction it pulled from my bank servers for the last month had to be re-accepted even though it had been downloaded, accepted, and reconciled. Turning this option off didn't fix the problem. It is very frustrating because I can't tell what's new and what's not now. It treats all my old dowloaded and reviewed transactions as something new. Anyone know why or how to fix it? In microsoft.public.money, BASIC since TRS-80 wro...

at times i have to reboot to start Outlook 2003, any help?
it would be appreciated Sounds like you have a 3rd party application or addin that isn't letting Outlook close properly. Try bringing up the task list (start > run > tasklist.exe > ok button) to see if Outlook is still running when it won't start. (check the processes tab) "skimmi" <skimmi@discussions.microsoft.com> wrote in message news:42FAFCC7-55BC-45DB-B8D7-674FF9638B14@microsoft.com... > it would be appreciated Not sure if this helped or not? The problem did happen again and tried what you suggested but the screen only flashed up momentari...

rpc over http long logon time
How long should it take after Outlook starts before the prompt appears and asks for the password? Then afer that, how long before Outlook connects and starts downloading mail? Ours takes from 30 seconds to a minute for both steps. User are very confused why they start Outlook and have to enter their password a minute later, and still can't use Outlook for another minute. Thanks, Neal ...

Outlook 2003 POP save on server x days
Hi, In Outlook 2003 - Accessing POP3 Mail - When you select save on server x number of days - When does the time count for days begin? Lets say I have old E-Mails in Outlook - and on the server - I choose to leave on server 30 days - Will all E-Mail older than 30 days be removed from the server - immediately? Or will the time count 30 days from when I chose to leave them on the server - so 30 days from when I chose to leave on server for x days - they will begin being removed from the server? Thank You it's 30 days from the date you downloaded them into outlook. I...

Repeat values in column A a certain number of times depending on the value in column B
Imagine a set of data as set out below: Column A Column B Apples 24 Pears 36 Oranges 8 I want to poplulate a column (for exampel column A on a new sheet), where the values in column A will be repeated as many times as the value in column B Thus the first 24 rows will say Apples, the next 36 rows will Pears, Oranges. I need a formula that recogonizes that when it gets to row 25 that it should no longer need to copy Apples, but then switch to pears. This might sound like an unusual request but if I can grasp a way to do this I can create the table I need and populate the rest...

Time total
Hello All, I need some help with creating a query to sum a total time of a field. I have a table called client services and have a query which pulls: date of service, total time, and provider name. I would like to be able to create a query which will sum the total time field. I have look at other posts on here but am still confused. Also not sure what time set to use: minutes or hour/minute format. Thanks for your help, -Mark Mark, I assume that you want to total time across clients, do you want to do it for a specific period, (June 07) or just get the total time? To get the total ...

How do I autodate(excel) every 7 days ex. 1/1/06-1/31/06?
Enter 1/1/2006 in A1 In A2 enter =A1+7 Drag/copy down. Gord Dibben MS Excel MVP On Thu, 12 Jan 2006 11:36:03 -0800, "tlk1214" <tlk1214@discussions.microsoft.com> wrote: ...

date and time calculations in Excel 2003
Example: H6=01/14/2010 16:45 A6=12/31/2009 12:15 I want to get the difference between January 14th 2010 at 16:45 and December 31, 2009 at 12:15. Ideally, it would be days, hours and minutes. Like this==> ddd:hh:mm The formula is: =h6-a6 Use a custom format of: dd:hh:mm Regards, Fred "CJ" <CJ@discussions.microsoft.com> wrote in message news:1D38B37F-ED29-499E-A05E-F1682FF9F153@microsoft.com... > Example: > H6=01/14/2010 16:45 > A6=12/31/2009 12:15 > > I want to get the difference between January 14th 2010 at 16:45 and > D...

How do you print one address label at a time on avery 5160 labels.
I'll bet you have partial sheets of labels. I know that's why I have to use a work-around. You'll have to use a template of the entire sheet, not the wizard. 1. Go to http://publishermvps.com/Default.aspx?tabid=38 2. Download the template for Avery 5160 labels. 3. Create the label you want. 4. Print said label. 5. Thank Brian for saving you A LOT of time and work. (I've been known to lay my label out in Publisher and then copy and paste it into a Word document.) -- JoAnn Paules MVP Microsoft [Publisher] "sharonm" <sharonm@discussions.microsoft.com&...

Integration Manager Times Out
We are using Dynamics GP9. My integration uses ODBC connections to SQLServer2000 views. I can query the views using the same filters from Enterprise Manager, and the recordset returns with no problem. A fellow programmer accesses the same views for Crystal Reports, and his recordset returns without any problem. But my integration times out. Any ideas? ------=_NextPart_0001_13F2B12B Content-Type: text/plain Content-Transfer-Encoding: 7bit Hello Caroline, Please make sure you have Integration Manager 9.0 SP 1 installed. Next, add the following line to the IM.ini file under the [IM...

HAPPY NEW YEAR TO EVERY BODY
HAVE A HAPPY AND A SAFE NEW YEAR MSW ...

How can I limit the number of emails sent in a given time?
I work at a small business and I need to send an email to a list of several hundred custoers on a regular basis. However, my ISP limits the number of emails sent out to 20 per every five minutes. Is there a way to configure Outlook 2003 to send them in bursts or anything? I plan on using the mail merge through Word 2003, if that makes a difference. Any suggestions or help would be greatly appreciated! Mail Merge will send individual messages, but may exceet the 20 per five minute period. I would contact the ISP and you could possibly convert to a "business" account, probabl...

Brithdays & Anniversaries get recreated from time to time
Apparently Outlook occasionally (I guess at the begin of a year) recreates recurring appointments from the birthdays and anniversaries that it finds in my Contacts-entries. What's annying about this is, that for lots of birthdays I now have duplicates, i.e. TWO appointments. And what's desastrous is that all these new appointments have a reminder set at 12pm of that day. Thus, in the last couple of days repeatedly the alarm of my PDA has gone off to remind me of some friends birthday and woke up me and my wife at midnight (which each time caused some major quarrel and my PDA a...

Publisher is opening with Adobe EVERY TIME
I have to open publisher by selecting open with.. then choose publisher to get into my publisher program. It automatically tries to open with Adobe. Have you checked your file associations? -- JoAnn Paules MVP Microsoft [Publisher] "Amy" <Amy@discussions.microsoft.com> wrote in message news:D3BCF171-0DEC-4DD0-804C-F13680688F1C@microsoft.com... >I have to open publisher by selecting open with.. then choose publisher to > get into my publisher program. It automatically tries to open with Adobe. Right-click any Publisher file, properties, opens with.... change...