lilvegan1
Jan 21 2009, 06:23 PM
I am not sure where to begin with this question but I will give all the details I imagine are pertinent and will provide any additional information as needed.
I have a data entry form that has a subform. The main form always takes information and the subform occasionally takes information. The table behind the subform has its own primary key with a forgein key from the main form. There is a parent/child relationship between main and sub.
My database is live with hundreds of records. My users are working the DB from the runtime version.
My issue is that the sub form acts as a "follow-up log" for issues related to the main form. Each time there is a follow-up the contact is updated. Thes updates are recorded in the follow-up table. My issue is that I would like the subform to show a blank data entry ready textbox. It currently shows the first record which is then overwritten. I thought this would be simple enough to fix by doing:
Private Sub Form_Current()
On Error GoTo Error_Form_Current
DoCmd.GoToRecord , , acNewRec
Exit_Form_Current:
Exit Sub
Error_Form_Current:
MsgBox Err.Number & Err.Description
Resume Exit_Form_Current
End Sub
But this is throwing an error that is crashing the runtime version. My issue is compounded by the fact that I am not able to duplicate the error on my machine even when I run the runtime instance of it. So I guess my question is twofold...
What is causing the error and why am I not able to duplicate it?
Any help would be greatly appreciated.
theDBguy
Jan 21 2009, 06:34 PM
Hi,
Just a stab... try using the Open event instead of the Current event for your code.
Another option is to delete the code and set the Data Entry property of the subform to Yes.
Hope that helps...
lilvegan1
Jan 21 2009, 09:13 PM
Any thoughts on why I am not able to duplicate the error on my machine?
theDBguy
Jan 22 2009, 05:00 PM
Sorry, no idea. Are the machines completely identical? If not, it could be anything...
lilvegan1
Jan 29 2009, 07:22 PM
Sorry to resurrect this, but I finally was able to make the change. I set the data entry of the subform to Yes and still it is populating with the first record of the underlying table. This causes any data to be overwritten. Is this due to the parent/child relationship?
Bob_L
Jan 29 2009, 09:47 PM
Do you have Office 2003 SP3 installed WITHOUT the hotfix? If so, try applying the hotfix (and make sure everyone else has as well):
Access 2003 Post SP3 Hotfix
lilvegan1
Jan 29 2009, 11:08 PM
This did not affect the behavior of the subform.
Bob_L
Jan 29 2009, 11:11 PM
And you do, or do not have SP3 installed? Can you post the database?
lilvegan1
Jan 31 2009, 07:17 PM
This is a stripped down version of the DB. My users access records by double clicking the APP ID field in the queue on the left. Ths causes the form to open the selected record in the main form. The issue I am having is that the "Set Follow-up" is populating with the earliest related record. I would like the fields to be blank and ready for data entry.
Bob_L
Jan 31 2009, 07:19 PM
It doesn't seem to have uploaded properly. When I click on the attachment I get:
QUOTE
The file you have requested has not been found.
If you were trying to download an attachment from a post in the forums,
please inform the author of the post, with a reply on the same thread.
lilvegan1
Jan 31 2009, 07:41 PM
2nd try
lilvegan1
Jan 31 2009, 07:51 PM
still not working
lilvegan1
Jan 31 2009, 08:07 PM
1 more try
lilvegan1
Jan 31 2009, 08:13 PM
Ok, clearly I am having an ssue uploading. Are there known issues with this? Virus scan? Firewall?
Anyway I may have narrowed my problem. When I use the record selectors the form works as intended with the field blank and ready to accept new data. The way the records are normally accessed is by the user double clicking part of a continuous form (made to look like a data sheet). Te code in the event is :
DoCmd.OpenForm "frmComplaint", , , "[ComplaintID] = " & Me.ComplaintID & ""
Could this be part of my issue? Should it be
DoCmd.GotoRecord...?
Bob_L
Jan 31 2009, 08:13 PM
Did you make sure to run a compact and repair first and then ZIP it?
lilvegan1
Jan 31 2009, 08:30 PM
I did but will try a last time...
Bob_L
Jan 31 2009, 11:01 PM
QUOTE
The code in the event is :
DoCmd.OpenForm "frmComplaint", , , "[ComplaintID] = " & Me.ComplaintID & ""
Yep, that would seem to be your problem. You are opening to a specific record, not to a new record.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.