473,320 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

More OpenArgs Null problems

1
In searching for a solution to a current problem I ran across a thread from 2005 on the same issue, ( http://www.thescripts.com/forum/thread202473.html ). In that case it appeared that the problem had just resolved itself. I can believe that. I have a similar problem in a VBA program, using Access in Office XP. The problem seems to have a mind of it's own. Yesterday I went home and the code worked... today it doesn't.

The problem is with passing an OpenArgs statement when opening a form. In the new form I initially "seemed to have" fixed the problem by capturing me.openargs value into a variable in the Form_Open event. Now, that is passing as Null... again.

I've tried structuring the calling code directly using me.Name, tried it by setting a string variable to me.Name's value then passing that, even tried various combinations of single and double quotes... just in case.

Here's the calling code:

Expand|Select|Wrap|Line Numbers
  1.   Debug.Print "My name is "; Me.Name
  2.     'strMyName = Me.Name
  3.  
  4.  
  5.       'call the pop-up to add a new folder name
  6.       DoCmd.OpenForm _
  7.         FormName:=("frmNewFolder"), _
  8.         windowmode:=acDialog, _
  9.         OpenArgs:=Me.Name

''' The print statement above returns My name is frmAssignPermissions
---
In the new pop-up form I was monitoring the value here:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Open(Cancel As Integer)
  2.  
  3.     Dim strWhoCalled As String
  4.  
  5.     Debug.Print Me.OpenArgs
  6.  
  7.     strWhoCalled = Me.OpenArgs
'''The print statement above returns Null.
--
Like I said... it seemed to be working when I crawled home last night.
I rebooted the computer as always.
This morning the problem is present.
... Odd thing is... I had the same problem with the code several days ago and somewhere in fussing with capturing the OpenArgs in the Form_Open event it had gone away. Any thoughts?
Mar 9 '07 #1
3 7147
NeoPa
32,556 Expert Mod 16PB
I tried to reproduce your problem but it always worked for me.
Is there any possibility that you already have the form open when you run your test? Either in Design or Run view?
Mar 10 '07 #2
NeoPa - THANK YOU! Jesus, what a waste of an hour
May 19 '09 #3
NeoPa
32,556 Expert Mod 16PB
@DomPilbs
I'm not sure I follow.

Did that resolve the problem for you?
Are you Lou with a new account?
Are you someone completely different but stumbled across this thread when you were struggling with a similar problem?
May 19 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: nic | last post by:
Hi I am currently having problems getting two forms to behave the way I want. I have two tables Student and Application, and their respective forms. (Tables)Student has StudentID (PK) & an...
5
by: nic | last post by:
Hi am having difficulty understanding why the following is not working. Dim TempID As Integer Set TempID = Me.OpenArgs Knowing that OpenArgs is a string I then changed the declaration of...
3
by: Tim Marshall | last post by:
I am almost certain that when I opened a form in A97 that openargs was available in that form's class module for the whole time the form was open. Apparantly this is not the case in A2003. From...
3
by: Jim Evans | last post by:
Using code and suggestions from an earkier thread in this group, I have created the following cond for the open event of a form I am opening from the button click event of another form. ...
4
by: Barry Edmund Wright | last post by:
Hi All, I am using the code below to assign a form name to a form variable (vFrm). Is there a way to assign the Openargs string directly to vFrm, i.e. vFrm = Openargs ? Private Sub...
2
by: shumaker | last post by:
I think the problem lies in my understanding(or misunderstanding) of the scope of references. 'Code from button click event on first form: Private Sub Ok_Click() Dim strRecordSource As String...
13
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On...
2
by: Robert | last post by:
I have a form (frmWorksheet) that contains project information from a Projects table. The form contains a number of fields including ClientID and Project. On the form header is two combo boxes,...
3
by: angi35 | last post by:
I'm having a zero-length string problem... Hoping someone can help. (This is in Access 2000.) In FormA, I have a button that opens FormB with OpenArgs. In FormB, the OpenArgs are translated into...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.