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  

Go to a form and fill in a field



 
 
Thread Tools Display Modes
  #11  
Old March 8th, 2006, 10:24 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Take out all the [ ]'s (in the module too if they're there). Didn't mean to
twist you up with them. And no worries, I don't always name my stuff right
away either =)

hth
-Jayyde

"sweyer" u19457@uwe wrote in message news:5cf7920ab6a39@uwe...
This is the code for the button on the parent form:

Private Sub Command65_Click()
On Error GoTo Err_Command65_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "NewDependent"
[SSNModule].SetSSN ([SSN])
DoCmd.OpenForm stDocName, DataMode:=acFormAdd


Exit_Command65_Click:
Exit Sub

Err_Command65_Click:
MsgBox Err.Description
Resume Exit_Command65_Click

End Sub



And this is the code for the child form (on open):

Private Sub Form_Open(Cancel As Integer)
txtParentSSN = SSNModule.GetSSN
End Sub


In the parent form, Command65 is the button name (yea I know I should
rename
it, I'll do that later) and SSN is the parent's SSN number (same name of
the
field in the table that this form is connected to - not the same table as
the
child form).

In the child form, ParentSSN is the name of the text box that holds the
value
of ParentSSN, which is the name of the field in the table this is
connected
to.

Jayyde wrote:
Shouldn't. Unless in form current you're resetting the text box to empty
or
something. What's the code? and is it still throwing an error?

I still can't get it to work.....the form is opening in Add mode, does
that
make a difference?

[quoted text clipped - 15 lines]

Thank you!



  #12  
Old March 8th, 2006, 10:25 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Oh and it's not giving me an error. It's just opening the form, but not
filling in the text box.

Jayyde wrote:
Shouldn't. Unless in form current you're resetting the text box to empty or
something. What's the code? and is it still throwing an error?

I still can't get it to work.....the form is opening in Add mode, does that
make a difference?

[quoted text clipped - 15 lines]

Thank you!

  #13  
Old March 8th, 2006, 10:51 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Nope....still not working. I usually don't have a problem with the [ ]'s, so
I din't think that would have been the cause. Well, I'm done for the day. If
you think of anything else that could cause this to not be working, post it
and I'll check again when I get back in the office on Friday. (I'm off
tomorrow).

Thanks for your help!

Jayyde wrote:
Take out all the [ ]'s (in the module too if they're there). Didn't mean to
twist you up with them. And no worries, I don't always name my stuff right
away either =)

hth
-Jayyde

This is the code for the button on the parent form:

[quoted text clipped - 47 lines]

Thank you!

  #14  
Old March 9th, 2006, 04:00 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Hm. I'm assuming that in that global module the SSN string that you're
getting and setting is Dim-ed at the top, right?

"sweyer" u19457@uwe wrote in message news:5cf7969b20e15@uwe...
Oh and it's not giving me an error. It's just opening the form, but not
filling in the text box.

Jayyde wrote:
Shouldn't. Unless in form current you're resetting the text box to empty
or
something. What's the code? and is it still throwing an error?

I still can't get it to work.....the form is opening in Add mode, does
that
make a difference?

[quoted text clipped - 15 lines]

Thank you!



  #15  
Old March 10th, 2006, 05:00 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

I guess....this is that the global module says:

Dim strSSN As String

Public Sub SetSSN(SSN As String)
strSSN = SSN
End Sub

Public Function GetSSN() As String
GetSSN = strSSN
End Function


Jayyde wrote:
Hm. I'm assuming that in that global module the SSN string that you're
getting and setting is Dim-ed at the top, right?

Oh and it's not giving me an error. It's just opening the form, but not
filling in the text box.

[quoted text clipped - 9 lines]

Thank you!


--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200603/1
  #16  
Old March 13th, 2006, 04:18 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Anyone else have any suggestions?

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200603/1
  #17  
Old March 14th, 2006, 03:15 PM posted to microsoft.public.access.forms
external usenet poster
 
Posts: n/a
Default Go to a form and fill in a field

Try putting it into form_current instead, it might be the data mode =
acformadd (i didn't do that in mine).

"sweyer" u19457@uwe wrote in message news:5cf7d1aac2a65@uwe...
Nope....still not working. I usually don't have a problem with the [ ]'s,
so
I din't think that would have been the cause. Well, I'm done for the day.
If
you think of anything else that could cause this to not be working, post
it
and I'll check again when I get back in the office on Friday. (I'm off
tomorrow).

Thanks for your help!

Jayyde wrote:
Take out all the [ ]'s (in the module too if they're there). Didn't mean
to
twist you up with them. And no worries, I don't always name my stuff
right
away either =)

hth
-Jayyde

This is the code for the button on the parent form:

[quoted text clipped - 47 lines]

Thank you!



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Pulling data from values selected in dropdown list-values back to babs Using Forms 1 January 26th, 2006 07:40 PM
How can I fill in a form field and have it show up in another FF? Forrest General Discussion 1 October 21st, 2005 02:46 PM
Auto fill a field every row? Brian Using Forms 1 August 1st, 2005 07:35 PM
Requerying a pop up form to display in the main form Jennifer P Using Forms 13 April 5th, 2005 06:59 PM
automatically fill field with form information Tina L. Using Forms 2 January 14th, 2005 07:18 AM


All times are GMT +1. The time now is 09:05 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.