G
Guest
Hello,
We have a system that was developed in Access by a summer student several
years ago. We are having a problem with one of our functions that calls a
macro. There are some SendKeys actions in the macro that have the Wait
option set to "Yes" but the waiting is not long enough so we are running into
problems with the macro "getting ahead of itself." This is what an Access
developer suggested.
So we want to convert the macro to code.
This is what needs to be done:
- change the value of two fields of the current record being displayed in
the form
- make a duplicate record of that record and change two fields in that record
- display the new record in the form
So, in the On Click event of the button, we need to choose Event Procedure
and add the code. I can get that far, but we do not have in-house Access
knowledge. So I am stuck as to what commands to use to make these changes
described above. How do I refer to the table in the code? How do I refer to
the current record? How do I change the values in the appropriate fields?
How do I copy the record and add a duplicate record, position the record
pointer to the new record and change the values in the appropriate fields?
I expect that if I simply convert the Macro to code, the SendKeys function
will still present problems.
In a language that I am familiar with, I could do these things in minutes.
But I don't know how to do it in Access and the programmer that we consulted
said it would cost several hours in labour. We are non-profit and can't
afford it. Any help would be appreciated.
Thanks,
Joe
K-W Humane Society
We have a system that was developed in Access by a summer student several
years ago. We are having a problem with one of our functions that calls a
macro. There are some SendKeys actions in the macro that have the Wait
option set to "Yes" but the waiting is not long enough so we are running into
problems with the macro "getting ahead of itself." This is what an Access
developer suggested.
So we want to convert the macro to code.
This is what needs to be done:
- change the value of two fields of the current record being displayed in
the form
- make a duplicate record of that record and change two fields in that record
- display the new record in the form
So, in the On Click event of the button, we need to choose Event Procedure
and add the code. I can get that far, but we do not have in-house Access
knowledge. So I am stuck as to what commands to use to make these changes
described above. How do I refer to the table in the code? How do I refer to
the current record? How do I change the values in the appropriate fields?
How do I copy the record and add a duplicate record, position the record
pointer to the new record and change the values in the appropriate fields?
I expect that if I simply convert the Macro to code, the SendKeys function
will still present problems.
In a language that I am familiar with, I could do these things in minutes.
But I don't know how to do it in Access and the programmer that we consulted
said it would cost several hours in labour. We are non-profit and can't
afford it. Any help would be appreciated.
Thanks,
Joe
K-W Humane Society