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

Add record problem

Status
Not open for further replies.

lipo

Programmer
Nov 25, 2002
52
US
I have a problem when I try to add a record to a form that also has a grid. A box comes up and asks to select option for adding records. I find it annoying. How can I get rid of it??
 
Could you be a little more specific?

You're adding a record to a form? Or a table that is displayed via a grid on the form?

What does the message say exactly? I don't recognize it from what you've described.
 
lipo,

A popup prompt? Are you trying to do a modification to an existing form?

Peping
 
I am adding a record to a table. The form contains textboxes with the fields and also contains a grid. I am using the VFP default txtbtns for control. The grid uses the table as its record source. When I click "add" I get a pop up box that states: A. select option for adding records : (radio butons) add to record parent only, add record to child (grid only), add record to both
B. Enter key value linking parent and child records
 
It doesn't sound like you are, but are you talking about the TextBox from the "Form Controls" Toolbar?

If not and you're using the classes that come with Foxpro, maybe that's a required parameter for that and maybe you can set it programmatically so the box doesn't pop up?



 
WHen they hit the add button are you selecting the table you want to update? Sounds like maybe you are in a few files related and need to tell it which file to update?
 
It appears you are using the wizbtns class. This is the default behavior for adding a record using that class. Why? I'm not sure. I haven't used it.
So, you could subclass that class and tweak the code (not recommended), or you can add a NODEFAULT() clause in your add button and write your own Add code.
Dave S.
 
I would wish to put a nodefault() clause and write my own code. However, the default code provides so many record locking and other features. Is there any way to modify the default code or use a simpler version of the code??
 
Try using the 'txtbtns' instead of the 'gridbtns'.
As long as you are using only one table for the grid, they should work fine.
Dave S.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top