Listbox not populating every time

T

Todd

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!!!
 
T

Todd

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top