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

New to forms & data not connecting.

Status
Not open for further replies.

1836

Technical User
Jun 19, 2008
18
HI All

I havent really used forms & am starting now. I have the following problem: used the wizard to create data update for client.dbf among the data is a field called group consisting of group code, in the Data Environment added the group.dbf & linked it with client.dbf (line is connecting the group fields in both tables). i whould like to have the user enter a group code and at that time will move the group name from the group.dbf into the group_name field of the client.dbf. in the inteactiveChange event of the group field i have the following code:
thisform.group_name1.value=group.group_name
this is not working why?

thank you
 
Hi 1836,

A couple of points. First, rather than the InteractiveChange, use the LostFocus. The reason is that InteractiveChange fires on every keystroke. What you want is to wait until the entire value has been entered.

Also, is your Group_Name1 control bound to the group_name field (by which I mean, does it a have a ControlSource property pointing to Group.Group_Name)? If so, then all you're doing is setting the group name to itself, which is presumably not what you want.

When a control is bound to a field in a table, the table field will automatically be updated with the contents of the control.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top