Automatic new entry and disable old entry

G

Guest

I am relatively new to access still so please bear with me.

I have created several tables and brought them together in one form.
Everything seems to work fine but there are to large problems that I need
help fixing.

1. When a user opens the form I need it to open to a clear/new entry. Is
there a way to do this? It currently opens and there is an entry in there.
2. Also I plan on implementing user restrictions where the basic user won’t
have the access to the toolbars etc. Also when the open the same form as
above I don’t want them to be able to go back through old records. Is there a
way to do this?



Thanks,
Justin
 
G

Guest

yes there is way to do it, atleast it worked for me,
write the following code to the button's on click property which opens your
form,

Private Sub Command16_Click()
On Error GoTo Err_Command16_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "FORM NAME"
DoCmd.OpenForm stDocName, , , stLinkCriteria
DoCmd.GoToRecord , , acNewRec

Exit_Command16_Click:
Exit Sub

Err_Command16_Click:
MsgBox Err.DESCRIPTION
Resume Exit_Command16_Click

End Sub

AND ABOUT YOUR SECOND PROBLEM ,
IF CLICK ON TOOLS AND THEN STARTUP ON THE DATABASE WINDOWNS IT WILL GIVE
YOU THE DIALOG BOX WHERE YOU CAN SELECT ALL THE OPTION YOU WANT TO GIVE THE
USER AT RUN TIME.
HOPE THIS WILL HELP YOU
 
G

Guest

Does anyone know what toolbar I would be turning off? I thought it would be
the status bar but that doesn't seem to work.

The toolbar I want to turn off is at the bottom of the form. It says record
and has the arrow keys to go through the different entries.
 

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