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

provide the user with a listing method

Status
Not open for further replies.

coldan

Programmer
Oct 19, 2008
98
AU
I have a form on which a chkbox triggers the display of a container.

This contains a text box and a chkbox.

The idea is that the user can choose to enter a single product number or a list of numbers.

In my code so far the single number processing works now I want to add the chkbox click() method . My code so far is

Code:
cMessageText = ' New list [Y] ReUse existing [N]'
nAnswer = MyMsgBox(cMessageText, cMessageButtons1,cMsgTitle)
If nAnswer = 1
	Create Table List (pernum N (8))
	APPEND blank
	Browse FIELDS pernum
Else
	If !Used('list')
		Use List In 0
	Endif
	Select List
Endif

Either way the list table will be used in later processing.

My problem is that I wish to provide the user with a way to automatically add another record after an entry is made.

Can anyone suggest another method or modify what I already have?

Thanks

Coldan
 
Coldan,

Do you mean you want to let them fill in the new record within the Browse, then automatically append another new record? Like in a spreadsheet?

If so, the only thing I can suggest is that you instruct the user to press Ctrl+Y after making the first entry.

But, really, the Browse window isn't the best tool for this job. It would be much better to create a form, and to place a grid on it. Then, in the LostFocus of the right-most column in the grid, you can programmatically execute APPEND BLANK, then move the focus to the first column of the next row.

In general, a Browse window is good for quickly accessing your data in the development environment, but it's not a good end-user tool.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Mike,

Thanks for your comments.

Thus far to solve the problem I have appended 100 blanks when the table is created and then the Browse allows up to 100 entries ( more than enough).

My user has also used the ReUse command to add entries to an existing table.

It's not elegant but it has satisfied him.

Before I release the next version I will try your suggestion - thanks.

Coldan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top