Open File

  • Thread starter Thread starter DJS
  • Start date Start date
D

DJS

Could someone explain to me how I could write a routine to open a file
through access? I'm trying to open PDF files located in a static directory
by using an ID field in a table.. For example, record id=3 would open
//network/pdf/3.pdf. Any help is appreciated.
 
DJS said:
Could someone explain to me how I could write a routine to open a file
through access? I'm trying to open PDF files located in a static
directory by using an ID field in a table.. For example, record id=3
would open //network/pdf/3.pdf. Any help is appreciated.

Application.FollowHyperlink "\\network\pdf\" & me.ID & ".pdf"
 
Open the form in design view, in the form properties set the following

AllowEdits Property set to false
AllowAdditions Property set to True

That will allow adding records, but no editing.
If you added a record, and then you moved to the next record that you want
to add, moving back to the previous record that you added won't let you edit
it any more.
 
the acNewRec doesn't create a new record, it just put in a position to enter
a new record, the new record created only after you entered data to the form
and when you exit the form, or when you moving to another record.
The question is, after you enter all the data to the form, before you exit
the form to you enter a value to this specific field.
If you do, then you save the new record with a value in it, so there is no
reason to get an error message.
 
Please ignore this two posts

Ofer said:
the acNewRec doesn't create a new record, it just put in a position to enter
a new record, the new record created only after you entered data to the form
and when you exit the form, or when you moving to another record.
The question is, after you enter all the data to the form, before you exit
the form to you enter a value to this specific field.
If you do, then you save the new record with a value in it, so there is no
reason to get an error message.
 
Back
Top