Still having problems with macro buttons.

  • Thread starter Thread starter chrissfcs
  • Start date Start date
C

chrissfcs

Hi can anyone throw any light on a problem I am having with macro buttons on
a form?

On a form for user input, I have a Duplicate Record button that will
replicate the last record entered without having to press Control + ‘ in each
field. This worked fine until I created some other buttons that append
specific records.

I created a table of 4 standardised records that I created individual append
queries for. I then created four buttons that automate adding each record to
the main table as required. All of these four buttons work fine. However,
the Duplicate Record button that I created first, stops working when the 4
other buttons are added!?! I get the following error message:

"Visual Basic for Applications (VBA) encountered a problem while attempting
to access a property or method. The problem may be one of the following.
Reference is missing or Expession misspelled."

Pleeeese can anyone help me?
 
You've asked a "how" question, assuming that we understand the "what".

In a relational database like Access, it all starts with the data. I'm
curious why you would need to replicate/duplicate records. This is often a
symptom of a table structure that's more akin to a spreadsheet than a
well-normalization relational table.

If you'll describe your data structure in a bit more detail, folks here may
be able to help with more specific suggestions.

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
My apologies Jeff. I work in a Library/Learning Centre and I have a database
that records different enquiries received for statistical as well as
reference purposes. I'm not a seasoned database developer by any means, but
the system I have fits our purpose. I have a main table that holds all the
data and a main enquiries form for users to enter the enquiries they receive
mainly from lookup lists and some memo fields for descriptions. Over the few
years that we have used the database we have recognised that there are some
what we would call standard type enquiries, but we still want to record them
for our stats. So, that is why I wanted to automate certain enquiries by
just one button press, hence my comments:-
I created a table of 4 standardised records that I created individual
append
queries for. I then created four buttons that automate adding each record
to
the main table as required. All of these four buttons work fine.
I wanted the duplicate record button because sometimes we receive several
similar enquiries from students, eg specific information that is current in
their course. In this instance, it would help just to input the data once
and click on the duplicate button to copy the record, hence:-
On a form for user input, I have a Duplicate Record button that will
replicate the last record entered without having to press Control + ' in
each
field.

I'm not very experienced with macros in Access and I'm muddling through as
best I can and I thought I'd cracked it. But as I said I can't get the
duplicate button to work with the other 4 append record buttons. I hope this
makes sense! :-/
Thanks for responding anyway.
Regards. Chris
 
Thanks for the clarifications ...

I'm still under the impression that the data structure your current
database/application is using is something more of a spreadsheet than a
well-normalized relational database.

Access is optimized to work with well-normalized data. If you try to feed
it 'sheet data, both you and Access will have to work overtime to come up
with work-arounds.

If "normalization" and "relational" are unfamiliar terms, plan on spending
time coming up to speed on them before expecting Access to help you solve
your business needs.

Good luck!

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Thanks for the advice Jeff.

As I said, I'm not an expert by any means. - I do understand "relational"
and I did my best with the normalisation when I set the tables up. I will
learn a bit more, then if I can't solve my problem, I'll probably start all
over again during the summer hols and maybe have a better version for next
academic year.

Regards. Chris
 
Also, consider posting your existing data structure to the tablesdbdesign
newsgroup for feedback...

Regards

Jeff Boyce
Microsoft Access MVP

--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.

Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.

You can thank the FTC of the USA for making this disclaimer
possible/necessary.
 
Back
Top