Connecting Tech Pros Worldwide Help | Site Map

Forms question - using a form to call a form

nospam_stunter2001@charter.net
Guest
 
Posts: n/a
#1: Nov 12 '05


Hi folks,

I'm new here and am a neophyte Access 2000 user/developer. A year
ago, I barely knew what Access was. I was asked by the people that
pay us to begin keeping certain data about the children's crisis
program I manage. After a couple of years doing this by hand on paper
(Yikes!), I decided that this was ridiculous. Out of neccessity, I
had to learn Access and develop a database to track clients and
services. So what I know, I've learned from places like this and from
the many text books I've picked up. I developed the database and
entered almost 3 years of data. We average about 30 kids and their
families a month, so there are quite a few records at this point.
Usual length of stay is about 12 days.

So, on to the question:

I have a form I've set up, frmIndivClient, that gives information on
previous clients including entry_date, exit_date and various details
of the case. That works fine. What I want is to have a form that I
can enter certain data about a particular client (Client ID, date of
birth or Last Name) and upon clicking a button (or whatever) the
form, frmIndivClient, will open to the record of that client. I've
been messing with it quite a bit and haven't come up with anything
really workable. I did put together a query that has [Client_ID #?]
in the criteria field of the Client_ID table item. open the form and
it asks for the Client_ID to open. do that and it opens to that
record. But I want to have a seperate form that there is a selection
of last name or client ID or date of birth. Fill in one or more of
the items and click the button and the form frmIndivClient opens to
that client. Often, we get questions about previous client's and it
would be nice not to have to plow throw records one at a time to find
the kid.

I suspect this is simple and I'm just not seeing it.

Hope all that's clear. Thanks for any help. Just about the time I
think I kinda know what I'm doing with this, I find out I don't know
much.

Randy




----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
PC Datasheet
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Forms question - using a form to call a form


Build a continuous form that lists your clients by last name. Be sure to include
the ClientID field. You can make it not visible. Add the following code to the
OnClick event of the last name field:

DoCmd.OpenForm "frmIndivClient",,,"[ClientID] = " & Me!ClientID

With this code you will be able to click on the last name in the list and
frmIndivClient will open to that client.


--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
resource@pcdatasheet.com
www.pcdatasheet.com


<nospam_stunter2001@charter.net> wrote in message
news:bpg2l4$sgv$1@news.netmar.com...[color=blue]
>
>
> Hi folks,
>
> I'm new here and am a neophyte Access 2000 user/developer. A year
> ago, I barely knew what Access was. I was asked by the people that
> pay us to begin keeping certain data about the children's crisis
> program I manage. After a couple of years doing this by hand on paper
> (Yikes!), I decided that this was ridiculous. Out of neccessity, I
> had to learn Access and develop a database to track clients and
> services. So what I know, I've learned from places like this and from
> the many text books I've picked up. I developed the database and
> entered almost 3 years of data. We average about 30 kids and their
> families a month, so there are quite a few records at this point.
> Usual length of stay is about 12 days.
>
> So, on to the question:
>
> I have a form I've set up, frmIndivClient, that gives information on
> previous clients including entry_date, exit_date and various details
> of the case. That works fine. What I want is to have a form that I
> can enter certain data about a particular client (Client ID, date of
> birth or Last Name) and upon clicking a button (or whatever) the
> form, frmIndivClient, will open to the record of that client. I've
> been messing with it quite a bit and haven't come up with anything
> really workable. I did put together a query that has [Client_ID #?]
> in the criteria field of the Client_ID table item. open the form and
> it asks for the Client_ID to open. do that and it opens to that
> record. But I want to have a seperate form that there is a selection
> of last name or client ID or date of birth. Fill in one or more of
> the items and click the button and the form frmIndivClient opens to
> that client. Often, we get questions about previous client's and it
> would be nice not to have to plow throw records one at a time to find
> the kid.
>
> I suspect this is simple and I'm just not seeing it.
>
> Hope all that's clear. Thanks for any help. Just about the time I
> think I kinda know what I'm doing with this, I find out I don't know
> much.
>
> Randy
>
>
>
>
> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the[/color]
eb -----[color=blue]
> http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
> NewsOne.Net prohibits users from posting spam. If this or other posts
> made through NewsOne.Net violate posting guidelines, email abuse@newsone.net[/color]


Fredg
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Forms question - using a form to call a form


nospam_stunter2001@charter.net wrote:
[color=blue]
>
>
> Hi folks,
>
> I'm new here and am a neophyte Access 2000 user/developer. A year
> ago, I barely knew what Access was. I was asked by the people that
> pay us to begin keeping certain data about the children's crisis
> program I manage. After a couple of years doing this by hand on paper
> (Yikes!), I decided that this was ridiculous. Out of neccessity, I
> had to learn Access and develop a database to track clients and
> services. So what I know, I've learned from places like this and from
> the many text books I've picked up. I developed the database and
> entered almost 3 years of data. We average about 30 kids and their
> families a month, so there are quite a few records at this point.
> Usual length of stay is about 12 days.
>
> So, on to the question:
>
> I have a form I've set up, frmIndivClient, that gives information on
> previous clients including entry_date, exit_date and various details
> of the case. That works fine. What I want is to have a form that I
> can enter certain data about a particular client (Client ID, date of
> birth or Last Name) and upon clicking a button (or whatever) the
> form, frmIndivClient, will open to the record of that client. I've
> been messing with it quite a bit and haven't come up with anything
> really workable. I did put together a query that has [Client_ID #?]
> in the criteria field of the Client_ID table item. open the form and
> it asks for the Client_ID to open. do that and it opens to that
> record. But I want to have a seperate form that there is a selection
> of last name or client ID or date of birth. Fill in one or more of
> the items and click the button and the form frmIndivClient opens to
> that client. Often, we get questions about previous client's and it
> would be nice not to have to plow throw records one at a time to find
> the kid.
>
> I suspect this is simple and I'm just not seeing it.
>
> Hope all that's clear. Thanks for any help. Just about the time I
> think I kinda know what I'm doing with this, I find out I don't know
> much.
>
> Randy
>
>
>
>
> ----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
> http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
> NewsOne.Net prohibits users from posting spam. If this or other posts
> made through NewsOne.Net violate posting guidelines, email abuse@newsone.net[/color]

Randy,
Change the form names below as needed.
Add a command button to Form1. Code it's Click event:

' Save the record if you have just added a new Client
DoCmd.RunCommand acCmdSaveRecord
' Open Form2 to that Client's Record.
DoCmd.OpenForm "Form2", , , "[ClientI_D] = " & Me![Client_ID]

The above assumes [ClientID] is a Number Datatype.

Display the clients record on form1 and click the button.
Form2 will open at that clients record.

If you wish to suspend operation until you close Form2, change the above
code to:

DoCmd.OpenForm "Form2", , , "[Client_ID] = " & Me![Client_ID] , ,
acDialog




--
Fred
Please reply only to this newsgroup.
I do not reply to personal email.
RM Powell
Guest
 
Posts: n/a
#4: Nov 12 '05

re: Forms question - using a form to call a form


On Wed, 19 Nov 2003 17:36:35 +0000, Fredg wrote:

[color=blue]
> Randy,
> Change the form names below as needed. Add a command button to Form1.
> Code it's Click event:
>
> ' Save the record if you have just added a new Client
> DoCmd.RunCommand acCmdSaveRecord
> ' Open Form2 to that Client's Record.
> DoCmd.OpenForm "Form2", , , "[ClientI_D] = " & Me![Client_ID]
>
> The above assumes [ClientID] is a Number Datatype.
>
> Display the clients record on form1 and click the button. Form2 will
> open at that clients record.
>
> If you wish to suspend operation until you close Form2, change the above
> code to:
>
> DoCmd.OpenForm "Form2", , , "[Client_ID] = " & Me![Client_ID] , ,
> acDialog[/color]

Thanks both of you for the info. I kept thinking this couldn't be that
tough. I tried something similar to Fredg's idea, but did realize you
needed the additional datatype. I'm just starting to learn VB for Access
and I'm not even close to understanding the syntax.

Thanks for the help, I'll try both approahes out and come back if I run
into troubles.

Randy
nospam_stunter2001@charter.net
Guest
 
Posts: n/a
#5: Nov 12 '05

re: Forms question - using a form to call a form


In article <bpg2l4$sgv$1@news.netmar.com>, <nospam_stunter2001@charter.net>
writes:
[color=blue]
>I have a form I've set up, frmIndivClient, that gives information on
>previous clients including entry_date, exit_date and various details
>of the case. That works fine. What I want is to have a form that I
>can enter certain data about a particular client (Client ID, date of
>birth or Last Name) and upon clicking a button (or whatever) the
>form, frmIndivClient, will open to the record of that client. I've
>been messing with it quite a bit and haven't come up with anything
>really workable. I did put together a query that has [Client_ID #?]
>in the criteria field of the Client_ID table item. open the form and
>it asks for the Client_ID to open. do that and it opens to that
>record. But I want to have a seperate form that there is a selection
>of last name or client ID or date of birth. Fill in one or more of
>the items and click the button and the form frmIndivClient opens to
>that client. Often, we get questions about previous client's and it
>would be nice not to have to plow throw records one at a time to find
>the kid.[/color]

Hi folks,

---Man, using this NewsOne thing is ponderous.---

OK, so I tried some of the suggestions offered and, no suprise, they work. I
set up a form with command buttion with this code on click.

' Save the record if you have just added a new Client
DoCmd.RunCommand acCmdSaveRecord
' Open frmIndivClient to that Client's Record.
DoCmd.OpenForm "frmIndivClient", , , "[ClientID] = " & Me![Client_ID] ,
,acDialog

This works pretty well as far as opening the correct form on click. But I have
it set up so that you have to scroll through a thousand records to find the
client you want, then click the button to open the form. Is there some way to
set up the form so that you open the form, type into a text box the client's
ID you're looking for, click the button and have it open the form
frmIndivClient to that client?

Hope I'm not being too dense here. I think I'm missing some critical point.

Agan, thanks for any help.

Randy

----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
Closed Thread