Ask Your Question
1

Button navigation between Base forms? [closed]

asked 2013-12-22 12:21:16 +0100

nigelmercier gravatar image

updated 2015-08-27 13:31:50 +0100

Alex Kemp gravatar image

Is it possible to set up a button on a form that will save the contents and open another form? The second form would need a similar button to go back. In fact good design means that both forms would have both buttons, hopefully one showing as active.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-11-16 17:56:42.605504

1 Answer

Sort by » oldest newest most voted
1

answered 2013-12-23 03:12:45 +0100

frofa gravatar image

Button navigation between Base forms has to be done with a macro which launches when a push-button on your form is clicked. Does this link help? Here is a movie tutorial that might also be useful.

edit flag offensive delete link more

Comments

Yes, that helps a lot, thank you. I can now switch between forms using the following:

Sub OpenForm_1
const sNewDocumentName="Log Entry"
const sOldDocumentName="Maintenance Entry"
REM STORE? ThisDataBaseDocument.FormDocuments.getbyname(sOldDocumentName).store
ThisDataBaseDocument.FormDocuments.getbyname(sOldDocumentName).close
oNewFormDocument = ThisDataBaseDocument.FormDocuments.getbyname(sNewDocumentName).open
End Sub

Sub OpenForm_2
const sNewDocumentName="Maintenance Entry"
const sOldDocumentName="Log Entry"
REM  STORE? ThisDataBaseDocument.FormDocuments.getbyname(sOldDocumentName).store
ThisDataBaseDocument.FormDocuments.getbyname(sOldDocumentName).close
oNewFormDocument = ThisDataBaseDocument.FormDocuments.getbyname(sNewDocumentName).open
End Sub

I'm still working on how to make it save the contents of the form, although sometimes it does.

The second form uses part of the same table as the first (linked with PK ID from first table as FK in second 1:n). The main problem is that when I switch to the second form, there is no FK reference added for the current ID into the second table.

nigelmercier gravatar imagenigelmercier ( 2013-12-23 18:59:14 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-22 12:21:16 +0100

Seen: 3,416 times

Last updated: Dec 23 '13