can't type in combo box

dragfie

Registered User.
Local time
Tomorrow, 01:34
Joined
Jul 3, 2013
Messages
24
hello, I have a combo box, which auto fills a field box "on change"
for some reason though, even after following the instructions I see on other web-sights I cannot type into the box.

I have:
limit to list: no
auto expand: no

and no other code on it apart from the auto-fill code
what I want to be able to do, is type into the box, and if it is not a proper value, I can click the drop down box and select values that start with the value I typed.

thank you.
 
what is the rowsource for your combo box?
 
SELECT [STOCK].
Code:
, [STOCK].[Retprice] FROM STOCK ORDER BY [Code];
 
I cannot type into the box.
since you are bringing through two fields you need to set your limit to list to yes (it only works if there is only one column)

Also check you have column count=2 and column widths either blank or at least not set to zero for the first column. You also need to have autoexpand set to Yes.

what I want to be able to do, is type into the box, and if it is not a proper value, I can click the drop down box and select values that start with the value I typed
Not quite sure what you mean by this, if you mean the auto complete (ie autoexpand) then the above should fix this for you.
 
yes that did help, thank you but now another problem appeared.
after enabling those, the field I had that it updated does not change, when I write in a code.
also this box is located in a subform, and now, in the main form, I cannot cycle through all the other rows...
I could before I played with the combo box, everything was fine and I have no idea what happened...
please help..
 
after looking into it some more, it seems that the code for the fill dissipated, but when I went into the VBA editor, it was written there. so I re-wrote it and it showed but but it has not changed anything in the actual form
 
no matter, I just screwed up the main form and fixed it by cross checking with a new form
 
ok, all other problems are fixed but my original problem still exists. I have: limit to list: yes
auto expand: yes
but what happens is that when I type into the combo box, no text appears. it is blank and it does give me a value but I can not see what value it is.
when I open the down tab on the combo box, and then type, it does what is should for a second (shows highlighted the rest of a code) but immediately disappears.
 
Any chance you can upload a sample of your db to demonstrate the problem - I'm out of ideas at the moment!
 
Make a new combobox using the wizard. I think your problems have to do with column count or column width.

Also, use the AfterUpdate event unless you have some specific reason for using On Change.
 
um for the first one, how do I do that?

for the second. I have made a new one, twice, and same problem. the first time, I was fiddling with it and made it work, but at the same time screwed my form (the above posts). I then fixed the form, but the combo box was working but not showing a result, so I re-did it which lead to the second time. in both times, when I type I see nothing in the box, or it instantly goes to the first code.
with the columns, I'm not sure what you mean. I have the price I am taking in the second (1) column and it fills out correctly when I click the drop down box and select a code. but I can not type into it.
 
um for the first one, how do I do that?

Use the advanced reply, not only can you format text, put things in quote or code boxes to preserve formatting but also add attachments
 
Couple of options:

1. Compact the db - that may be sufficient

2. Take a copy and remove all tables that are not relevant to this problem plus all forms/reports that are not relevant. Then in the tables remaining remove what data you can, leaving enough to demonstrate the problem. Then compact the db.

Also you can zip the file up which will reduce file size
 
ok here it is, its the ASALE form, in it's sub-form the "code" combo box. when I type into it it either does not show or sticks to the first code.

since your already looking at it, there is one more thing I cant figure out yet, and that is how to have the "total" field in the main form equal to the "sumtotal" text box in the sub form. (after update does not work because the text box updated automatically not by me.)

thank you for your help
 

Attachments

OK - first problem, the combo box. The reason you have a problem is because you have your event in on change.

The on change event is triggered every time you make a change - i.e. enter a character. There is no point having this code in the on change event because there is not a price available until you have entered the full code and made a 'selection' which is the update event. If you move the code to the combo box after update event, this will solve the problem.

With regards your total, I see you have that as a field in your ASALE table - it is not required. Remove the field from your ASALE table and change the control source for your main form total control (which will now be unbound) to:

=[ASALLINE Subform].[Form].[totalsum]

A few other things I've noticed:

In your table you have dates formatted as d/m/yy - this really should be dd/mm/yy as when you enter the field, the field appears to change which can be disconcerting to the user.
Not sure why you have the time field with the date picker - should turn this off
Similarly you have this formatted as @ when it should be short time?
And again with the time field you are showing the vertical scroll bar which is not required
 
thanks a lot that really helped, but with the other things you have noticed, I have no idea how to change those.
I imported this DB from Paradox, which may be the reason, but I am completely inexperienced with Access, so I would be extremely grateful if you could explain (or give me a sight explaining) how to change those.

and with the totals box. that would be fine temporarily but what I want is to fill the ASALE table with the total from each invoice, which would make end day reports, summering, and finding receipts easier. In paradox, I had to run a query to fill those results in at the end of each day, but I was wondering if in access I could have it update immediately and automatically.

thanks
 
with regards your sales totals for the day, I strongly advise you do not keep it in the invoice header - you will increase enormously the work required to maintain the figure if a new line is added, deleted or changed. By the same token, You don't need a date field in the ASALLINE table because you already have it in the ASALE table and you don't need the total field in ASALLINE either because you can calculate it

To add the sales for the day, simply have the following query

Code:
SELECT ASALE.Date, Sum([Quant]*[retprice]) AS TotalSales
FROM ASALE INNER JOIN ASALLINE ON ASALE.Invoice = ASALLINE.Invoice
GROUP BY ASALE.Date
HAVING (((ASALE.Date)=#7/1/2012#))

With regards my other comments, have a look at the control properties and field properties in table design - most of them will be under the format tab
 
thanks so much dude,
just a last thing, could you tell me the names of the pices of code you are using in the query? or a link to a video tutorial now to write what you have written there. this is just because I would like to be able to edit and understand everything I have here.

thanks
 
could you tell me the names of the pices of code you are using in the query
Not quite sure what you mean - it is standard SQL.

If you open a new query in design view, close down the select tables form without selecting any tables and then select SQL view (top left in the ribbon) and paste the code into the SQL area - overwriting whatever is there. Then you can return to design view to see what this looks like graphically.

If you want to learn about SQL, this link can help

http://www.w3schools.com/sql/default.asp

Good luck!
 

Users who are viewing this thread

Back
Top Bottom