Problem with DoCmd.Open Form code - additional problem

  • Thread starter evilcowstare via AccessMonster.com
  • Start date
E

evilcowstare via AccessMonster.com

Hi part of this was already answered a while ago but I have now found a
problem with it that I need to fix, im just unsure what to do.

I have a main table that I wanted to be set up so that when using navigation
buttons you couldnt click into a new blank record.
This was fixed by turning off allow additions to the forms properties.

I also needed to be able to add a new record but via a click of a button on
another form and for the on click action used..... DoCmd.OpenForm "Jobs", ,
, , acFormAdd

The only problem I have is that once I the form opens up I can save the
record and go forward into a new blank one and cant navigate to any of the
previous records.

What I want is for it to only allow the one record added and to be able to
use the navigation buttons to straight away view other entries.
I can deal with it not allowing just one record if its too complicated but I
do need to be able to use the navigation buttons at the moment I just keep
getting " cant go to record"

If i open the form up on its own the buttons work fine and I cant go to a new
blank record which is fab.
I just need the same to work from the button in the other form and allow just
one entry

Can anyone help??

Thank You
Jay
 
J

Jeff Boyce

Jay

You've described "how" you are trying to do something.

Consider stepping back a bit and providing more "why" information -- it may
be that folks here could offer alternate approaches if they knew why you are
doing this, and what (business value) you hope to accomplish.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
E

evilcowstare via AccessMonster.com

Hi
I basically wanted to stop a user being able to click into a new record on
the form by using the navigation buttons. This is because I wanted to force
people to go via another form to fill in some information before allowing
them to start a new record.

so the process was....

Enter customer details in form1..... Click button.....opens job info form2
and goes to a new record so stuff can be filled out.

I only wanted people to be able to get to a new record when they click the
button on the first form and no other way.

The way to fix it was offered priviously but gave the problematic results I
wrote about.

Hope this helps

Jeff said:
Jay

You've described "how" you are trying to do something.

Consider stepping back a bit and providing more "why" information -- it may
be that folks here could offer alternate approaches if they knew why you are
doing this, and what (business value) you hope to accomplish.

Regards

Jeff Boyce
Microsoft Office/Access MVP
Hi part of this was already answered a while ago but I have now found a
problem with it that I need to fix, im just unsure what to do.
[quoted text clipped - 32 lines]
Thank You
Jay
 
J

Jeff Boyce

Let me try to paraphrase... (you are still describing "how" ... one form,
click button, second form ...)

You want a user to provide one set of information before they provide a
second set.

If that's a fair statement, one way you could do this is to use a single
form, and disable the controls that will hold the second set of data until
AFTER they've filled in the controls for the first set. This avoids buttons
and multiple forms and ...

Regards

Jeff Boyce
Microsoft Office/Access MVP

evilcowstare via AccessMonster.com said:
Hi
I basically wanted to stop a user being able to click into a new record on
the form by using the navigation buttons. This is because I wanted to
force
people to go via another form to fill in some information before allowing
them to start a new record.

so the process was....

Enter customer details in form1..... Click button.....opens job info form2
and goes to a new record so stuff can be filled out.

I only wanted people to be able to get to a new record when they click the
button on the first form and no other way.

The way to fix it was offered priviously but gave the problematic results
I
wrote about.

Hope this helps

Jeff said:
Jay

You've described "how" you are trying to do something.

Consider stepping back a bit and providing more "why" information -- it
may
be that folks here could offer alternate approaches if they knew why you
are
doing this, and what (business value) you hope to accomplish.

Regards

Jeff Boyce
Microsoft Office/Access MVP
Hi part of this was already answered a while ago but I have now found a
problem with it that I need to fix, im just unsure what to do.
[quoted text clipped - 32 lines]
Thank You
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top