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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textbox doesn't grab record

Status
Not open for further replies.

ricm9

Programmer
Jun 7, 2002
20
US
My form is linked to a table, and I have controls linked to the table's fields.

I also have a listbox also connected to the table. I use the listbox to select the record for the form/controls.

When I call the form from the switchboard, the controls are blank and the listbox does not select the record, but when I click on the form from the database window, all controls reflect the first record and the listbox works as planned.

Also, if I switch to design mode, and immediately switch back to run-time, everything works fine.

How do I get my form to work from the switchboard?
 
When you open the form, are you on a new record? If so, is there a possibility that there could be either a macro or some code on the command button from the switchboard that is doing something to force your form onto a new record? Maybe you're opening it as data entry or using a GotoRecord.new expression with the button?

Just a first guess...let me know.

-Patrick

Nine times out of ten, the simplest solution is the best one.
 
Thanks for helping.

Yes, (I just figured out) the form is opening to a new record. However, the code to select the form's record (therefore filling the textbox controls) from the listbox's selection does not work.
 
Have you tried editing the switchboard? Open Switchboard Manager, find the switchboard item that opens your form, and change the command from "Open Form in Add Mode" to "Open Form in Edit Mode".

Ken S.
 
Yup, that did it. I just clicked too fast on the set up.

THANKS!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top