Creating a New Record Within a Subform

NuclearSlug

New member
Local time
Today, 04:31
Joined
Apr 27, 2015
Messages
5
Hi Folks,

After some research on this site, I was able to solve half of my problems with my current database project. However, like often time, I fixed one thing only to create a new issue. Here's what I'm trying to do:

I have a main form that controls 2 subforms. sbfActiveProjects displays a list of records that have not been flagged as complete. Upon clicking on a record in sbfActiveProjects, the details of that record show up in sbfProject. This functionality works great, except when I try to create a new record. The code works fine for getting a new record, however once I run the command I lose my ability to navigate to other active records. Any suggestions?

Code:
Private Sub cmdNewProject_Click()
    'set focus to sbfProject
    sbfProject.SetFocus
    
    'navigate to new record
    DoCmd.GoToRecord , "", acNewRec
End Sub
 
I lose my ability to navigate to other active records. Any suggestions?
The above sentence only holds meaning for YOU and for mind-readers:D

Read my signature and then provide the needed info.
 
I figured out where I went wrong.. To summarize the issue, I was able to create a new record in a sub form from my main form, but when I went to navigate to a new record on my sub form, the link between the two subforms no longer worked. The sub form would show a new record, but I was forced to close and reopen the form in order for my master/child relationship to work between subforms again. Turns out, Enabled was set to no in the data tab for the subform.

So many hours spent to check one stinking box.. :banghead:
 

Users who are viewing this thread

Back
Top Bottom