Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Re: WriteLn - OnFormEntry (Read 1952 times)
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Aug 22nd, 2006 at 12:12am
Print Post Print Post  
In a GUI you need to get back to the main event loop for things to show up. Your loiter prevents that, and then you clear and close the slate - all before the GUI can get back to the main event loop.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #1 - Aug 22nd, 2006 at 12:19am
Print Post Print Post  
Wow, that was a fast response, I was changing the programming and deleted the original message!

So, any hints as to how I can identify @userid when I first enter a form? I was going to put the programming into an element, but a user may not enter thta element in search mode.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #2 - Aug 22nd, 2006 at 12:26am
Print Post Print Post  
You were "identifying" the user just fine in the code you deleted from the forum. The problem was in how you were showing the user their own ID. If you want something on the form, use an unbound static text and change the label.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #3 - Aug 22nd, 2006 at 12:41am
Print Post Print Post  
I guess I'm missing something.

I put an unbound static text element on the form: LE42
It is not labeled. Programming is:

var vWho as String

vWho = @UserID

if vWho = "fberg" then
{
  LE42 = "fberg"
}

I log on as fberg, and the element is blank when I open the form. I guess I'm not understanding why I should use a static text element to hold a changing variable.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #4 - Aug 22nd, 2006 at 12:49am
Print Post Print Post  
How big is the element. Make sure it is big enough to show the string you are assigning.

Also, why not just:

Code
Select All
LE42 = @UserID
 



You might have to force the redraw, though when I tried it just now it wasn't necessary.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #5 - Aug 22nd, 2006 at 1:05am
Print Post Print Post  
Maybe I need to reboot and start over. Tongue

Here's what I have.
Static text element LE42 unlabeled. Width 135, Height 18
Form name: Orders
On form entry (Orders):
Le42 = @UserID
ForceRedraw()

Logged on as: fberg
Preview app: Le42=""

Angry
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #6 - Aug 22nd, 2006 at 1:15am
Print Post Print Post  
I assume you are entering the form in Add mode or Update mode - not search mode.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #7 - Aug 22nd, 2006 at 1:21am
Print Post Print Post  
Don't "ASSUME" anything.  Cheesy

Isn't amazing how sometimes missing ONE little step makes a big difference? Talk about a rookie mistake.

Thanks for your time, effort and PATIENCE with me!!
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #8 - Aug 22nd, 2006 at 1:24am
Print Post Print Post  
If you want it to appear in the retrieve spec in search mode, just drop the same code in the Retrieve Spec Open event.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #9 - Aug 22nd, 2006 at 1:31am
Print Post Print Post  
Thanks Mark, that's exactly what I was looking for. Even the Loiter works well now.
When I grow up I wanna be just like you! LOL (celebrating 35th wedding anniversary today)
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #10 - Aug 22nd, 2006 at 1:38am
Print Post Print Post  
NICEBERG wrote on Aug 22nd, 2006 at 1:31am:
Thanks Mark, that's exactly what I was looking for. Even the Loiter works well now.


Is there any particular reason to loiter?

Quote:
When I grow up I wanna be just like you! LOL (celebrating 35th wedding anniversary today)


Congrats. Hope you have many more ahead. Though growing up (never mind growing up to be like me) might be an impediment.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #11 - Aug 22nd, 2006 at 3:28am
Print Post Print Post  
Thanks for the thought!

Re: Loiter - I actually wanted a WriteLn box to inform the user who they are logged on as, then disappear. I don't really need the info as part of a permanent record. We have a couple of users that need to log on differently depending on what they want to do.

Now this leads to another question. Is it possible to do an @MSGBOX in SEARCH mode, not UPDATE? I'd like to prompt the user how to enter retrieve criteria, i.e., ("Do not enter data with dashes.","USE: 5400PC192 vs 5400-PC-192","").

The next morning: Re-reading this, I wasn't clear enough. I know I can do an @MSGBOX "On Retrieve Spec Open" because I"m doing it. What I'm after is to do another box when a PO# field is entered to input retrieval criteria. I wouldn't want the box to pop up every time the form was entered because the person may not be doing anything with the PO# - that would just be annoying.
« Last Edit: Aug 22nd, 2006 at 11:31am by NICEBERG »  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: WriteLn - OnFormEntry
Reply #12 - Aug 22nd, 2006 at 11:54am
Print Post Print Post  
I have a form that contains a static text element with notes about retrieve specs. It is always there when I open in search mode, but does not require me to respond to it like @MsgBox would. It is only visible in search mode, because I use Visibility(LE25, 0) in the [i]FormName[/i]::On Form Entry event.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: WriteLn - OnFormEntry
Reply #13 - Aug 22nd, 2006 at 1:26pm
Print Post Print Post  
I thought about that, but I just don't have room on the Form for another element. It's something needed by only a few people, so I don't want it appearing every time I open the form.

I also thought about using a mask, but that won't work as the order number grows (999-1000, etc). I'll keep gnawing away. I guess once the people that are using that portion of the report get a little experience, it really won't be needed anyway.

Thanks for the idea!
Fred
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: WriteLn - OnFormEntry
Reply #14 - Aug 22nd, 2006 at 2:43pm
Print Post Print Post  
NICEBERG wrote on Aug 22nd, 2006 at 1:26pm:
I thought about that, but I just don't have room on the Form for another element.


How big is your form (width by height) in pixels?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print