Topic: after deleting fields from database, My script now gets an error...

Hi All. I was playing around with my project this morning and I somehow messed up something, and now my script won't compile. It Gives an error that I haven't had since first trying MVD. I get the error on the code that turns off the menu items. Project is attached.

thanks for any help...

Post's attachments

Attachment icon Contacts.7z 989.06 kb, 384 downloads since 2015-12-14 

Nothing inspires forgiveness quite like revenge.

Scott Adams

Re: after deleting fields from database, My script now gets an error...

Hello,


You should change this code:

    frmStart.mniAbout.Visible := False;
    frmStart.mniOptions.Visible := False;
    frmStart.mniFile.Visible := False;

to

    frmMain.mniAbout.Visible := False;
    frmMain.mniOptions.Visible := False;
    frmMain.mniFile.Visible := False;

Because only main form (first in the tab) have menu.

Dmitry.

3 (edited by jumper 2015-12-14 16:20:17)

Re: after deleting fields from database, My script now gets an error...

Hi Dmitry. That doesn't work because the form that is supposed to be the startup form is frmStart.  After getting the error, the wrong form shows up. That's with the code you suggested I change. When I run the program, (after getting the error) frmMain is launched. It was working great last night. The only different thing today was I messed around with the database removing a couple of fields. When running the program after changing the database, I received a OS error popup. It showed some Hex code where the error occurred. Could be anything. It hasn't popped up after the first couple of times.

I hope this info helps. If you have anymore questions, please just ask.

EDIT: I have the database saved in many places on my drive, and I get the error no matter which database I switch to...

Nothing inspires forgiveness quite like revenge.

Scott Adams

Re: after deleting fields from database, My script now gets an error...

jumper
In your project, main form is frmMain.
Just place form frmStart on first tab and all will work (just drag tab "frmStart to left").

Dmitry.

5 (edited by jumper 2015-12-14 17:03:29)

Re: after deleting fields from database, My script now gets an error...

Wow Dmitry. Once again I have learned something. I didn't know the tabs could move and at the same time control what form is the startup form. Plus, I didn't know it could cause your script to have errors.

Thanks a bunch

Nothing inspires forgiveness quite like revenge.

Scott Adams

6 (edited by jumper 2015-12-14 17:49:25)

Re: after deleting fields from database, My script now gets an error...

Guess I spoke too soon. frmMain grid is not populated with saved records. I added a new record, then all the records that wasn't showing up in the grid came back. However, it didn't stick. I ran the program again and the grid did not show records. Don't know why the records are not displayed after closing the program.

   
Any help greatly appreciated.

Nothing inspires forgiveness quite like revenge.

Scott Adams

Re: after deleting fields from database, My script now gets an error...

Please attach again your project.

Dmitry.

8 (edited by jumper 2015-12-14 18:15:11)

Re: after deleting fields from database, My script now gets an error...

Hi Dmitry. Hate to bother you so much, but I thank you for your help. See attached file...

   
One other question... does the builder.dll file get generated when you run a program? I'm using version 2.3

Post's attachments

Attachment icon Contacts.7z 989.88 kb, 388 downloads since 2015-12-14 

Nothing inspires forgiveness quite like revenge.

Scott Adams

Re: after deleting fields from database, My script now gets an error...

On form "frmMain" in the settings of TableGrid "DbGrid" you should to enable option "Enable auto execution of the query" (CheckBox at bottom)

Dmitry.

Re: after deleting fields from database, My script now gets an error...

Hi again... That's weird about the "Enable auto execution..........". I've never used it before. But you're right, it fixed the problem.

   
Thanks so much for your help!

Nothing inspires forgiveness quite like revenge.

Scott Adams