Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Openargs unreliable results 2

Status
Not open for further replies.

petermeachem

Programmer
Aug 26, 2000
2,270
0
0
GB
Access 2003

I seem to be having a problem with openargs not working 'properly'.
In this specific example, formA has 4 columns and calls formB with a value 1,2,3 or 4 to display data for the relevant column. Sometimes this doesn't work as far as I can see and either openargs has the wrong value or possible null (Users just say it didn't work!).

Code on formB is like
Private Sub Form_Open(Cancel As Integer)
Me.Car = Forms!xfrmQuoteMain!xfrmQuoteDetail("Car" & Me.OpenArgs)

I have just read somewhere that this should be in Form_Load, not Form_Open. Is there any mileage in that or where else could the problem lie.

 
It should be in Load. The control is not yet available in Open.
 
How are ya petermeachem . . .

In the [blue]On Open[/blue] event the form is still in setup. Hence the [blue]Load[/blue] event is better! . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
Thanks for the prompt replies. I'll move the code. It works nearly always, just the odd time when it doesn't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top