×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Button in current for that opens another form...

Button in current for that opens another form...

Button in current for that opens another form...

(OP)
Basically, I have two simple forms: Training and Attendee.  Basically, I want to add a button to the Training form that will open a blank editable Attendee form.  I have meeting fields in the Attendee form set to inherit Training info, but the name and address and such should be blank.

Anyone that can help me with this?

RE: Button in current for that opens another form...

Here is some code that I have on a button in a form that opens a second form to allow entry of Employment Details.  It opens the second form in the same edit state as the original form.
  

Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Set uidoc = workspace.currentdocument
If uidoc.IsNewDoc Or uidoc.EditMode Then
  Call workspace.DialogBox("Employment", True, True, True, False, False, False, "Employment Details")
Else
  Call workspace.DialogBox("Employment", True, True, True, False, False, True, "Employment Details")
End If
End Sub


HTH



Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

RE: Button in current for that opens another form...

(OP)
I used that script, but when I hit the OK button it does not save the second form.

Any more ideas?

RE: Button in current for that opens another form...

So it opened the Attendee form, but when you close it, it doesn't save?

Do you have any buttons or anything on the Attendee form that call the 'Save' function?

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

RE: Button in current for that opens another form...

(OP)
What it does is create a dialog box with the form inside it.  Along the right side is a bar that contains two buttons: OK and Close.  Neither of these buttons will save it.  Having those buttons there will confuse people.  I need to not have those buttons there, and would be happy to include buttons within the form itself.

RE: Button in current for that opens another form...

Ok, try this instead:

Sub Click(Source As Button)
    Dim session As New NotesSession
    Dim db As NotesDatabase
    Dim doc As NotesDocument
        Dim uidoc As NotesUIDocument
    Set db = session.CurrentDatabase
    Set doc = db.CreateDocument
    doc.Form = "Attendees"
        set uidoc = doc
    Call doc.Save( True, True )
End Sub

This will create a new document and save it

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

RE: Button in current for that opens another form...

(OP)
Plus...if I try to do more than one at once it gives me an error that says i already have a document with that unique identifier.

RE: Button in current for that opens another form...

(OP)
On line 9 it says Type mismatch on Doc...

AIM: tfisbrian

RE: Button in current for that opens another form...

try uidoc = workspace.currentdocument

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

RE: Button in current for that opens another form...

(OP)
Error when trying to click the button: Variant does not contain object.

RE: Button in current for that opens another form...

i'll look into it a bit more, I was about to leave yesterday afternoon when we were posting.  I'll let you know what I find.

Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close