MsLady
Traumatized by Access
- Local time
- Today, 01:06
- Joined
- Jun 14, 2004
- Messages
- 438
When I open my mainform through an onClick event of a button, the form opens up with the subform on it is disabled/closed -- Just a blank white box shows in place of the subform on my mainform. Here:

However, when i go through the objects window and open the mainfrom directly. I am able to enter and update data and the subform shows up and works fine. Here:

This is the code attached to the onClick event on the mainMenu
This is the record source on the mainform:
The projectInfomation table is the record source
This is the record source on the subform:
The projectStatusCommentary table is the record source
The link fields are:
projectInformation.projectId
projectStatusCommentary.projectId
The tables are in sybase and my application has an ODBC connection to them.
I can update any of the tables directly without issues.
I have ran the queries independently and updated tables through the query and it works fine also.
I have been pulling my hairs out on this for over 3weeks now. cos i can't seem to find what's wrong.
I am not able to attache the db cos it's very huge. But i have copied the problematic form &subform, to a new db so you may see my design, and record sources.
If you have any suggestions, ideas, or you've come across this kind of issue before, anything...please make my new Year a happy one and help
I would really appreciate it!
Have a happy and prosperous new year.
Yours truly,
Frustrated one

However, when i go through the objects window and open the mainfrom directly. I am able to enter and update data and the subform shows up and works fine. Here:

This is the code attached to the onClick event on the mainMenu
Code:
Private Sub New_Project_Click()
On Error GoTo Err_New_Project_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "Project Status - Full Details2"
stLinkCriteria = "[projectId]= 0"
DoCmd.OpenForm stDocName, , , stLinkCriteria
[Form_Project Status - Full Details2]![Proj ID].Enabled = False
Exit_New_Project_Click:
Exit Sub
Err_New_Project_Click:
MsgBox Err.Description
Resume Exit_New_Project_Click
End Sub
This is the record source on the mainform:
The projectInfomation table is the record source
Code:
SELECT *
FROM projectInformation;
This is the record source on the subform:
The projectStatusCommentary table is the record source
Code:
SELECT projectStatusCommentary.projStatusId, projectStatusCommentary.projectId, projectStatusCommentary.statusCommentary, projectStatusCommentary.commentaryDate
FROM projectStatusCommentary;
The link fields are:
projectInformation.projectId
projectStatusCommentary.projectId
The tables are in sybase and my application has an ODBC connection to them.
I can update any of the tables directly without issues.
I have ran the queries independently and updated tables through the query and it works fine also.
I have been pulling my hairs out on this for over 3weeks now. cos i can't seem to find what's wrong.
I am not able to attache the db cos it's very huge. But i have copied the problematic form &subform, to a new db so you may see my design, and record sources.
If you have any suggestions, ideas, or you've come across this kind of issue before, anything...please make my new Year a happy one and help

I would really appreciate it!
Have a happy and prosperous new year.
Yours truly,
Frustrated one