Hi, I have a problem that on some reports and forms I have placed unbound textbox1 that has formula and does some calculations.
The textbox pulls information from a query and makes it available on report or form.
The problem I have is with second unbound textbox2 that takes result from textbox1 and applies module function to it. If there is some delay while first textbox shows result the second fails with error or with VBA debug popup because my VBA code got a string that is empty.
The problem is more obvious if first textbox uses dlookup function (is it the only one to display result on form or report from query?).
-------------------------------------------------
So for example I use module that converts numbers to words (for invoice). I have created a total query that calculates amount for certain invoice and then I use second query that takes this result and convert it to words.
I then include those queries in my report recordset and place them using design view.
I mean the module that convert numbers to words or any other never fails it it gets data from and is calculated by query.
--------------------------------------------------
1.So I'm confused should I create separate number to words queries and include them on form or report recordset.
2. Should I place unbound textbox place conversion code there with reference to a bound textbox field to get data from.
I save 1 query in every case I use scenario 2. when I make a report so that’s 6 queries less for my db. (I have 30qry's so far). Is it worth the redesign in effort to make it run faster and be more compact?
Your comments are appreciated.
The textbox pulls information from a query and makes it available on report or form.
The problem I have is with second unbound textbox2 that takes result from textbox1 and applies module function to it. If there is some delay while first textbox shows result the second fails with error or with VBA debug popup because my VBA code got a string that is empty.
The problem is more obvious if first textbox uses dlookup function (is it the only one to display result on form or report from query?).
-------------------------------------------------
So for example I use module that converts numbers to words (for invoice). I have created a total query that calculates amount for certain invoice and then I use second query that takes this result and convert it to words.
I then include those queries in my report recordset and place them using design view.
I mean the module that convert numbers to words or any other never fails it it gets data from and is calculated by query.
--------------------------------------------------
1.So I'm confused should I create separate number to words queries and include them on form or report recordset.
2. Should I place unbound textbox place conversion code there with reference to a bound textbox field to get data from.
I save 1 query in every case I use scenario 2. when I make a report so that’s 6 queries less for my db. (I have 30qry's so far). Is it worth the redesign in effort to make it run faster and be more compact?
Your comments are appreciated.