This helps, but it doesn't answer the question: How do I get the drop-down to stay at the last customer I processed instead of starting over at the beginning?
I have a ComboBox that has a query for the RowSource. It selects all customers that have a certain salesman code. I then pull down the list of customers and select the 1st customer that I want to place an order for and enter my order. At the end, I tab over the last field and my ComboBox goes...
I am trying to come up with a program that will perform golf league secretary functions. My form would contain Name, Flight, Holes(1-18), Total, Handicap, and Net. I need this for as many as 24 golfers per page, and virtually unlimited number of glofers.
I have not had any schooling on this. I just picked it up from examples of other code, plus I figured some of it out on my own. As I said earlier, I never heard of datasheet processing, and I don't know how to proceed without some kind of example(s).
In my main system, I have used:
4 Tables
Recordsets
6 Queries
13 Forms
Multiple Combo Boxes
4 Modules
Lots of Visual Basic statements
Some SQL Statements
It now works just as if I entered a hard-coded date. It also responds as I indicated before. The combobox shows the 1st record in my database. When I do a pull-down, it shows me only the years that I am looking for. Is there a way to get the initial combobox setting to show the 1st record of the...
This code is already in a query. My Rowsource points to the query name. I've shown the value of the field in a Msgbox in the "on current" vba code, so I know it contains the correct value. As I said before, this works if I use a hard-coded date.
TNameDateTime is a String field containing a Name concatenated with a Date concatenated with a Time. This is what I want to show in the combobox. Date is another field in my database that I'm trying to filter on. Is this not possible?
Still no joy. I even tried putting in the Forms! in front of my formname to see if that would help.
Here is what I'm presently using:
SELECT [Tournaments].[TNameDateTime]
FROM Tournaments
WHERE Year([Tournaments].[TDate])="' & Forms!Selection![YearSel] & '";
After the = is " and...
The single quotes are enclosed inside of the double quotes. This is a query for the RowSource of my combobox.
If I use an actual date(ie. '2003') it works better but not perfect. The combobox shows the first record on the database(which is a 2002 date) and when I do a pulldown, it shows all...
I tried it and all I got was a single record which was the very first record on the database.
This is what I am using:
SELECT [Tournaments].[TNameDateTime]
FROM Tournaments
WHERE Format([Tournaments].[TDate],"yyyy")="' & Selection![YearSel] & '";
Any idea why it won't work?
I have a database and one of the fields is a date field. I would like to be able to select records for my combobox using only a 4 position year. If that year appears in the date, then I would like the record to show in my combobox.
Never mind. I found an answer that would work when looking at the response to FoxProProgrammer May 13, 2002-->Update a record) by BanditLV May 13, 2002. There is just so much information on this site, it is all but impossible to search it all.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.