Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplication of Record-Continued 1

Status
Not open for further replies.

Dophia

Technical User
Jul 26, 2004
263
CA
Hi Everyone: I am back to trying to fix the button on a form which should duplicate the record. I've had this problem for quite a while and this is a continuation of my previous thread thread702-1384365. I had given up on this until I recently tried Aceman's suggestion to use the "tag" on another form (as per the previous thread) and it worked! So I went back to my original form, but the only way it will work is if I delete the control and add it back to the form.

This is great, but what could have been the problem? I compared the properties of the control before and after. There were some changes, but even if I change it back to the original, the code to duplicate the ones with a "?" in the tag property now works. So, a belated "Thank You" to Aceman!

Can anyone tell me why deleting the control and then re-entering it works?

Sophia
 
How are ya Dophia . . .
Dophia said:
[blue]Can anyone tell me why deleting the control and then re-entering it works?[/blue]
The obvious answer is, [blue]the control wasn't properly instantiated the first time![/blue]

Why, is something I've never been able to find out myself. For all my resources, extensive library, and hardcore searches, I could never pin this down. In earlier years, I was expecting to find this listed as a bug! . . . but never have.

Although it rarely occurs, it is a pain when it crops up. I've had this happen in all versions (don't know about 2K7 yet). [blue]Best you can do is keep it in the back of your mind for those times its needed.[/blue] If I have to fight with a control for more than 10 to 15 minutes, [green]deleting and reinstantiating the control is one of my 1st options.[/green]

[blue]It is a relief to know that we can at least move on! . . .[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Thank you Aceman for the information!

This form has been a thorn in my side for months and months! I didn't know that deleting the control and re-entering it was a possible solution.I have been searching online, but I haven't come across anything.

Thank you again, Aceman!

Sophia
 
Dophia . . .

Wooooooooooooa! Hold on a sec before you run off . . .

You did say:
Dophia said:
[blue] I compared the properties of the control before and after. There were some changes, but . . .[/blue]
You may just have the only viable info in history on this problem! For my library and future attempts at tracking this down, could you answer the following (if possible [thumbsup2]):
[ol][li]What type of control was it! (textbox, label, combobox, what!)[/li]
[li]List the differences in properties before & after that you noticed![/li][/ol]
I'm hoping you havn't deleted some copy of the origional yet! . . . else the data is lost forever [surprise]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Aceman:

Basically all of the controls on the form had to be deleted and re-entered. I keep tons of backups, so I have both the before and after.

The change in the control "before" and "after" was that for some of the controls, I had originally entered a "Validation Rule" and "Validation Text", which had to be re-entered when I deleted and re-entered the control. Also, "Limit to List" was changed from "Yes" to "No". And of course the font, width, height, and other cosmetic changes.

The controls were text boxes and combo boxes.

FYI...In trying to pin down the error with the form, I had deleted the VBA code too, but it didn't matter.

I orignially had a "duplication" button which was created with the Wizard, which worked for about a year. Then all of a sudden it stopped working. The form also has two subforms, which I have never been able to duplicate either. I am working on trying to fix this now.

Sophia
 
Aceman:
I just noticed that after I delete the control and choose it from the field list to enter back on the form, the label's name is shown as "Label207" for instance instead of "Arrival_Date_Label". But the associated text box's name and control source is okay. I can't see where the label is still listed at it's original name elsewhere on the form either.

Sophia
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top