Problem with Text Box to Open Another form to display a record (1 Viewer)

Mark Nash

New member
Local time
Today, 13:00
Joined
Aug 5, 2021
Messages
8
Can anyone help? I'm clearly an amateur and know next to no VBA or SQL. The problem occurs with a main form, with many records, and I have a text box to open another form to view the full details of the current record. It works, and then when I shut down the DB and go back in, I get the below, which then errors when I click, with a box Return without GoSub, and a subsequent macro sing step stop all macros box.

1628435307351.png
The form design looks like this:
1628435684349.png


The embedded macro looks like this:

1628435707660.png


I've got a feeling the answer is super-simple, but I've spent hours trying to sort it out. Can anyone help? Much appreciated

Thanks
Mark
 
Last edited:

theDBguy

I’m here to help
Staff member
Local time
Today, 05:00
Joined
Oct 29, 2018
Messages
21,455
Hi Mark,

Welcome to AWF!

I am only guessing but maybe by having the same name for your field, textbox, and tempvar; the code may be getting confused.
 

Mark Nash

New member
Local time
Today, 13:00
Joined
Aug 5, 2021
Messages
8
Hi Mark,

Welcome to AWF!

I am only guessing but maybe by having the same name for your field, textbox, and tempvar; the code may be getting confused.
Thanks DBguy, I wish I understood what you are saying! Sorry, im a total numpty. Should I delete the If statement?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:00
Joined
Oct 29, 2018
Messages
21,455
Thanks DBguy, I wish I understood what you are saying! Sorry, im a total numpty. Should I delete the If statement?
How about this? Could you share a sample copy of your db with test data?
 

Mark Nash

New member
Local time
Today, 13:00
Joined
Aug 5, 2021
Messages
8
The strangest thing. I renamed the file to put on here for you to look at, and its now working? Thank you for your offer of help, if it breaks again I'll put it up on here.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 05:00
Joined
Oct 29, 2018
Messages
21,455
The strangest thing. I renamed the file to put on here for you to look at, and its now working? Thank you for your offer of help, if it breaks again I'll put it up on here.
Hi. Glad to hear you got it working. Good luck with your project.
 

Users who are viewing this thread

Top Bottom