Is there a way to let a text box remember last entered value? I want the last entered value to be a default value. When I enter new value, other that default, the new value becomes a default value.
It seems I found it. As the Caloendar allways stays on the last chosen date, all I should do is to put [Calendar].[Value] in default value field in textt box properties. Now it works.
It shows the right value in properties and still there's a #Name? in text box.
Maybe there is another way out? For example, can I take the last records date as a default value?
Then this should work:
Private Sub Calendar_Click()
dat = Calendar.Value
Me.dat.DefaultValue = "#" & Calendar.Value & "#"
Combo18.SetFocus
Calendar.Visible = False
End Sub
But it works for the current record only. When I it jumps to next new record, it shows #Name? again.
I need to add many records with the same date in my form. So I put a button next to my date text box "dat", that wakes up a calendar. That looks like this:
Calendar.Visible = True
Calendar.SetFocus
Then I put a following code:
Private Sub Calendar_Click()
Me!dat.DefaultValue = "#" &...
Erm.. I just read your second reply :)
You see, I have many queries. I allways run all these queries and then write down results in excell to calculate. Now, I would like to make a form, which would calculate it fast with a single click :)
It all must look like this:
Listboxlabel1: 100$...
Actually, I made it all with listboxes. But, there I stopped, because, now I need a textbox, which sums all the values in listboxes. But the value in textbox looks like this 1178.582768.355837.45, resp, it manages listboxes values as text, not as curency.
Record Source for this textbox looks...
Yes, the query returns a single value. At first I tried text boxes, bet they did't return any value from a query.
How should I do this with text box?
Example:
text boxes name = tbox1
queries name = query1
queries SQL view is like this:
SELECT Sum([quantity]*[price]*[multiplier]) AS Supplied...
I have a textbox tb_value and a listbox lb_value. Listbox is bound to a query, it shows the query result. Listbox has only one row, resp. one value. Now, when I make another textbox tb_another, I write in its Control Source: =[tb_value]. Everything's ok, the value of tb_value is shown also in...
Well, I have another problem with this.
After I made several listboxes that are bound to queries, I made one, that must sum the values of all listboxes. But it doesn't work. When I write in lb_sumall Control Source = [tb_date], it works correctly. But when I write there, form example, =[lb_sum]...
Hm.. another problem. It works nice with a default date set in a textbox tb_date. But when I change the date, listbox lb_sum stays the same. How can I refresh it?
Yes, that is what I wanted. Well, I tried this with listboxes and it works nice, but not with textboxes. I must hold on to listboxes then, it seems..
Thanks for help :)
It's sintax error.
And when I put the statement like this:
=(SELECT Sum([daudz]*[cena]*[reizinatajs]) AS Summa FROM tpnos LEFT JOIN tap ON tpnos.npk = tap.nos WHERE (((tap.dat)>=#" & tb_date & "# And (tap.dat)<=#" & tb_date & "#)))
it gives no error, but it also gives no result. Textbox tb_sum...
Erm... well,
at first.. what is a recordsource property of tb_sum? I find only Control Source property. And, this SQL statement is taken from query's SQL view. It works fine. Query's name is bq_ap.
As far as I understand, I need to put this statement in a tb_sum Control Source? But it gives me...
I have a query like this:
SELECT Sum([daudz]*[cena]*[reizinatajs]) AS Summa
FROM tpnos LEFT JOIN tap ON tpnos.npk = tap.nos
WHERE (((tap.dat)>=[apd1] And (tap.dat)<=[apd2]));
It runs nice, asking me apd1 and apd1, which is two dates.
All I want is, to create a form, where is a textbox with a...
I have only 25 rooms ;)) But, when it goes to dates.. ;)
Yes, I know, it works well, when I have it for two weeks.
But, let's close this. The answer to all this, is to use a spreadsheet control inside of a form ;)
But it's not what I want.
I want this:
|A|B|C|D|E|F|G|H|I|J|K|..
|1|_|_|_|_|_|_|_|_|_|_|..
|2|_|_|_|_|_|_|_|_|_|_|..
|3|_|_|_|_|_|_|_|_|_|_|..
|4|_|_|_|_|_|_|_|_|_|_|..
|5|_|_|_|_|_|_|_|_|_|_|..
|6|_|_|_|_|_|_|_|_|_|_|..
..
B,C,D,.. goes for dates
1,2,3,.. goes for room numbers.
If room 4 is...
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.