I can access a single file from another form
Use of the term file in above is VERY confusing. The term "file" usually
means a file on your hard disk. You can see that the responder what thrown
complete off track by the user of the above term...
I suspect, and have to "guess" that you really meat you need to retrieve ONE
record, or perhaps a group of records that represents one customer, or one
of
something.
I have created forms for entering client info, employee info and work order
info. In the work oder info there will be many files.
I'd like to create a page where the user can type in a file number
Gee, now, we gone from the miss use of the term "file", and now are
interchanging the term "page" with that of a "form". The term page generally
has
a particular meaning in ms-access. IN fact, if you look closely at a form,
there is a "page" control, and this control is not to be confused with a
tab control. Again, you *really* make things difficult by half way through
your post do a "switchero" on the terms you use. This again really makes
things confusing.. By page, did you perhaps mean a form? (or, are you
*really* using the page control? -- or, perhaps data access pages (again,
data access pages have a particular meaning). For all purposes, I going to
have
to guess that you did not mean "page", but actually meant to use the timer
form.
I've created 3 forms. One for entering employee data, one for entering
client data and one for entering order information. All 3 are databases in
Access.
Gee, now we are talking about forms, but you also now are talking bout 3
databases? Are we really dealing with 3 databases now? When did this MAJOR
detail finally come to light? Or, perhaps by databases, you actually meant
that you have 3 tables? again, this is just so confusing and again you seem
to be switching terms halfway through a paragraph, and then again causing
more
confusing. Did you *really* mean 3 different databases? Are you trying to
tie
3 different databases together...or did you actually mean just 3 tables
(again, a grand canyon difference here).
Is that as clear as mud??
Actually, you done a very amazing job here confuse. You can't see anything
though mud, and your miss-use of terms is making this post VERY difficult to
follow.
Further, when did your name change from Rachelle to Eddie? (again is
another attempt to create even MORE confusing and make this thread
even harder to follow? Am I dealing with two differnt people here, and
this question is now split between two people who are on differnt
trains of throught????)>
Yes...this is clear a mud...you can't see though mud!!!
I going to have to make a "guess" that by 3 databases, you meant 3 tables
I going to have to make a "guess" that by "page", you actually meant forms
I going to have to make a "guess" that by the term "file", you did not mean
a windows computer file, but a general term, such as "customer file". Again,
in this case, I going to have to make a guess that by file, you actually
meant a record....
So,
1st Problem:
I need to be able to enter a customer number, and bring up the customer
record. (as mentioned, in non computer terms, we can call this a customer
file..but to do so in the context of computer question is VERY confusing,
since then how can I know you are talking about a computer file, or
customer file? We get a TON of questions here about how to open a word
file, or pdf file, or any type computer file here from ms-access. I don't
think you are talking about a computer file here, but if you are, then you
will have to correct me, and I likely just wasted yours and my time by
assuming you mean customer file).
For the above, you have several choices. A reasonable approach is to use
the
combo box wizard. Simply place the combo box in the forms header. When the
wizard launches, choose the 3rd option called:
Find a record based on the value I selected in my combo box
The above will thus build you a combo box that you can either
a) enter in the customer number, and the form will move to that record
b) simply choose a value from the combo box, and the form will move to
that record
So, you can either type in he number into the combo box, or "drop down" the
combo box with your mouse, and choose a existing number
So, the above should answer your first question.
2nd Problem:
user can type in a file number from the
work order and print that file
As mentioned, I don't think you trying to print a word file, or excel file
here. So, the solution is to build a nice report. Do NOT try and use a form
to print the record, use a report.
The code behind the button to print the ONE record to a report is
Me.Refresh ' force data to be written to disk, so report can see data
docmd.OpenReport "MyReprotName",acViewPreview,,"id = " & me!id
The above does assume your table has a primary key of id (this is the
default for autonumber field name). You could perhaps also consider using
the customer number you use, but using the built-in "id" field is preferred
if you have such.
and can I export that file to Microsoft word?
Again, I suspect you mean the report that is being display. You can send it
to word, but much of reports formatting will be lost. You can also send it
to a pdf file, or consider perhaps building word template? If it is boiler
plate type letter that you just need to fill in some fields, then using my
word merge library here is what you really need:
http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
So, do take to heart that there is a LOT of new terms, and a LOT of new
things when you learning ms-access. I can attest that this stuff can be very
confusing, and it will take awhile. We all been there. Hence, my comments
about how you confused us is not a big deal, but just something I wanted you
to realize that this stuff takes time to learn, and what seems perfectly
clear to you will not be to someone reading this stuff....
Good luck!!