Forms within Navigation form are not working

Outzen

Registered User.
Local time
Today, 22:56
Joined
Aug 16, 2012
Messages
10
I have worked for several weeks putting the basic forms together in a new customer database setup and then I just needed to finish my little project by smoothing the GUI adding a navigation form! ... big mistake. After investigating why my forms suddenly starts to fail when being activated from within the navigation form I have learned that I need to change the references :eek: because the forms will act as subforms within the navigation form.

Can somebody pls help me with the following example.
How should I change the following "On Open" vba event code after adding the form to a navigation form named Front_navigation:

DoCmd.GoToRecord acDataForm, "customer_create", acNewRec

When I try to open the form from the navigation form I get the following error: Run-time error 2489 The object "customer_create" is not open
 
Thks, I have already seen that info and I am still not able to put it together:o
 
You could use this one!~)

DoCmd.RunCommand acCmdRecordsGoToNew
 
Hmm - Im not allowed to include links :banghead:
Have uploaded to this location
freeuploadshare
.com
files
WQO41349701587

The navigation form is called Front_Navigation

rgds
Jakob
 
You could use this one!~)

DoCmd.RunCommand acCmdRecordsGoToNew

Great, it works ... I have only recently started working with access and VBA ... have a lot of experience with basic javascripting and jet sql.
Seems like a lot of these commands can be run without having to reference the current form?
Can you point at any good resources where I can learn a little more about the access vba structure - best practices etc?

Jakob
 
I'm glad you got it sorted... and regarding resources then they are unlimited with MS Access just Google away!~)
 
..by the way when you get to 10 posts then you can include links!~)
 
Hmm - Im not allowed to include links :banghead:
Have uploaded to this location
freeuploadshare
.com
files
WQO41349701587

The navigation form is called Front_Navigation

rgds
Jakob

You don't need to include links. Simply do a compact and repair on your DB put it in a Zip file and upload it using the paper clip icon at the top of the posting window.
 
OK, heres my zipped DB

Second question:
I have a list within the navigation form listing customers. I have included "show" and "edit" buttons which opens new forms with the selected customer. How do I make the new forms open within the navigation form?

Navigation form: Front_navigation
Customer list: _Kunde_oversigt_liste
(navigation title: navne liste, placed under "Kunder")
Customer details forms: _Kunde_kontaktinfo

"show" button:
Private Sub knp_vis_Click()
Dim stFormName As String
Dim stCurrentID As String
stCurrentID = Me.Id
stFormName = "_Kunde_kontaktinfo"
DoCmd.OpenForm stFormName, , , , acFormEdit, , stCurrentID
DoCmd.FindRecord stCurrentID, , True, , True, , True
End Sub

rgds
Jakob
 

Attachments

Users who are viewing this thread

Back
Top Bottom