A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Comments form help



 
 
Thread Tools Display Modes
  #1  
Old June 30th, 2008, 11:42 PM posted to microsoft.public.access.forms
SJ
external usenet poster
 
Posts: 6
Default Comments form help

I have been asked to create a button on a main form that displays
client data and will allow my users to add comments about the
respective clients in the db. I think this should have been done as a
subform, but I inherited this and it is not an option. I've been
searching the groups and web and haven't come up with anything yet.
I'm hoping someone there can help.
I need a command button that when clicked, will open a form and allow
my users to make whatever comments they need. The problem I am coming
up with is synching the client_id on the main form to the client_id on
the
new form. The source for the new form is a query that writes to a
table called, "Comments." I need to be able to select a client id
then hit the button and enter and view comments for that client only.
I can't seem to make it work. Frankly, I've reached a point where I'm
just banging around blindly. Has anyone worked with something like
this, and if so, could you share with me your solution - or just steer
me in the right direction?


Any help is much appreciated.
Thanks!
SJ
  #2  
Old June 30th, 2008, 11:59 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Comments form help

Hello SJ,

Open the comment form using this syntax


DoCmd.OpenForm "SomeForm", , , , acFormAdd, , client_id

The value of client_id will be passed to the new form as a property called
OpenArgs which can us used as a variable in the new form. Place a textbox
for client_id on the new form and set the Default value as [OpenArgs]. You
can make the client_id field invisible. This will make client_id the
ChildLinkField and it will be automatically populated whenever you add a new
records, as long as you open the form as shown above.

God Bless,

Mark A. Sam

"SJ" wrote in message
...
I have been asked to create a button on a main form that displays
client data and will allow my users to add comments about the
respective clients in the db. I think this should have been done as a
subform, but I inherited this and it is not an option. I've been
searching the groups and web and haven't come up with anything yet.
I'm hoping someone there can help.
I need a command button that when clicked, will open a form and allow
my users to make whatever comments they need. The problem I am coming
up with is synching the client_id on the main form to the client_id on
the
new form. The source for the new form is a query that writes to a
table called, "Comments." I need to be able to select a client id
then hit the button and enter and view comments for that client only.
I can't seem to make it work. Frankly, I've reached a point where I'm
just banging around blindly. Has anyone worked with something like
this, and if so, could you share with me your solution - or just steer
me in the right direction?


Any help is much appreciated.
Thanks!
SJ



  #3  
Old July 7th, 2008, 05:29 PM posted to microsoft.public.access.forms
SJ
external usenet poster
 
Posts: 6
Default Comments form help

On Jun 30, 3:59*pm, "Mark A. Sam" wrote:
Hello SJ,

Open the comment form using this syntax

DoCmd.OpenForm "SomeForm", , , , acFormAdd, , client_id

The value of client_id will be *passed to the new form as a property called
OpenArgs which can us used as a variable in the new form. *Place a textbox
for client_id on the new form and set the Default value as [OpenArgs]. *You
can make the client_id field invisible. *This will make client_id the
ChildLinkField and it will be automatically populated whenever you add a new
records, as long as you open the form as shown above.

God Bless,

Mark A. Sam

"SJ" wrote in message

...



I have been asked to create a button on a main form that displays
client data and will allow my users to add comments about the
respective clients in the db. *I think this should have been done as a
subform, but I inherited this and it is not an option. *I've been
searching the groups and web and haven't come up with anything yet.
I'm hoping someone there can help.
I need a command button that when clicked, will open a form and allow
my users to make whatever comments they need. *The problem I am coming
up with is synching the client_id on the main form to the client_id on
the
new form. *The source for the new form is a query that writes to a
table called, "Comments." *I need to be able to select a client id
then hit the button and enter and view comments for that client only.
I can't seem to make it work. *Frankly, I've reached a point where I'm
just banging around blindly. *Has anyone worked with something like
this, and if so, could you share with me your solution - or just steer
me in the right direction?


Any help is much appreciated.
Thanks!
SJ- Hide quoted text -


- Show quoted text -


Thank you for your help! Unfortunately, I must be doing something
wrong. I coded the command button to open the comments form using the
syntax that you provided, and I set the default value of the client_id
to [OpenArgs]. What I get when I click the button is a blank comment
form with the correct client_id. I can't view any of the other
comments and I wanted the customer's name to appear but it does not.
I am probably just overlooking something, but so far I can't figure it
out.
  #4  
Old July 7th, 2008, 08:11 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default Comments form help

SJ,

I may not be understanding your need. The method I provided will associate
comments to a particular main record. For example, if a client was named
Bubba's Grits and Beans and you added comments to the comment (popup) form,
they would pertain only to Bubba's record. If the popup form were
continuous you would view all of the comments for Bubba when you opened the
comment form. If you changed the main form to Millie's Mac and Cheese, then
the comments would pertain to Millie, and not Bubba. Does that make sense?

God Bless,

Mark



Thank you for your help! Unfortunately, I must be doing something
wrong. I coded the command button to open the comments form using the
syntax that you provided, and I set the default value of the client_id
to [OpenArgs]. What I get when I click the button is a blank comment
form with the correct client_id. I can't view any of the other
comments and I wanted the customer's name to appear but it does not.
I am probably just overlooking something, but so far I can't figure it
out.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.