Opening a form from another form

Forsteen

New member
Local time
Today, 11:39
Joined
Aug 29, 2004
Messages
4
Ok. Here is what I have.

First: 13 total forms, 13 total tables.

The first form looks like this:

monthform.JPG


As you can see it is one record with 12 tabs. Each tab has a specific month calendar from MS Excel. Note: These tabs have no fields.

The other forms are like this. One for each month:

monthform2.JPG


Now this is what I want. A button will be place on each day. Each button for example 1st of September will only up on 1st record of September. If I click on the 12th of September the form will open up to the 12th record. I want to make this as simple as possible for the user. Idiot proof.

I can create a command button, but it opens up that months form with all the records, but that is not what I want. I get the following error when I try to open that months form to a specific record. "You must have one field that can be linked on each form". Now the question is why?

formerror.JPG


Can someone help me?
 
The calendar tabs work and each has their own months calendar. Well the thing is I'm a novice when it comes to coding. The only thing I know right now is mostly mark-up languages.

If anyone can point me to the right direction I can probably take it from there.
 
As of right now none of the subforms are bound to either a table or query. Each of the subforms has the excel calendar. It's basically a picture within the subform. If you double click the form in edit mode it transfers to the excel edit, just like adding excel to PowerPoint. The only way it looks like is to find a way to bind the subforms without adding anything that you can see on the subform.

I just can't see why access can't open a another form that has been bound and go to a specific record. The calendar is just for visual and the button on each day is basically an external command.

It's just like a hyperlink on a website. Instead of making the link go to the index.html you have it go to a specific page i.e. picture gallery. You can right click or hold the shift button to open the link you clicked to open to another window.

Is this just not possible for access to do? It seems simple enough. AAAAHHHHGGGG!!! This has been racking my brain for the last two days.
 
Last edited:
Would this work for him, Pat?

That is if the form for September is "frmSep," and the date-field is called "txtDay"

Code:
Private Sub Sep1_Click()
    DoCmd.OpenForm frmSep
    DoCmd.GoToControl txtDay
    DoCmd.FindRecord 1
End Sub
Private Sub Sep2_Click()
    DoCmd.OpenForm frmSep
    DoCmd.GoToControl txtDay
    DoCmd.FindRecord 2
End Sub
 
Pat Hartman said:
IT CAN! I told you that. It is only the wizard that is the problem. Wizards are programmed to do very specific things and may not be useful if you need to deviate. The wizard in this case works ONLY with a bound form. You, however, can place whatever code you want into the click event. You don't need to use the wizard!!

Sorry didn't want to make it frustrating. How about this and I will leave you alone. Where is the best place to go for code building in access? Thanks Pat
 

Users who are viewing this thread

Back
Top Bottom