Programatically inserting values 
Author Message
 Programatically inserting values

Quote:

>I have a table with an address field. Ocassionally, numeric addresses are
>spelled or spelt, rather than numbered. eg "First" instead of "1st". This is
>undesired and I would like to pop up a form with all such addresses. I have
>designed the form and written a function that replaces "first" with "1st",
>"Second" with "2nd" etc. The form is in datasheet view with one text box
>showing the original data and another showing the calculated data. The first
>field is bound to the table the other isnt. I succeed in getting the form to
>pop up but if there are more than 1 records, every record in the calculated
>field calculates its value from field 1 of record 1 instead of from its
>corresponding record number. eg If there are 10 records, then all 10 values
>in column 2 would convert "25 Third st" in record 1 to "25 3rd st" even
>though each record in column 1 has a different value.

If you do not need to be able to edit the calculated value,
then instead of calling the function in code (or having the
function dig out the records value), use the function
directly in the text box's control source.  The trick is to
reference the original address field as an argument of the
function.  It should look something like this:

        =yourfunction([originaladdress])

--
Marsh
MVP [MS Access]



Fri, 04 Mar 2005 22:03:59 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Programatically inserting objects in an Access database

2. Inserting objects into fields programatically

3. Programatically Insert Text or Paste Clipboard at Cursor

4. Another "programatically insert text" question

5. Inserting Selection from one doc to another programatically

6. Inserting DOC2 into DOC1 programatically

7. Insert Picture Programatically

8. How do I set the value of an OLE field programatically

9. Get values from programatically added controls for StreamWriter

10. Update and insert with value in variables

11. Determining Autonumber value after INSERT

12. Insert Field Value In Email Subject Line

 

 
Powered by phpBB® Forum Software