"Columns not an object"-?!(still on)
Thread ID: 161119 Ilya Rabyy "Columns not an object"-?!(still on) Colleagues,
what might cause the error in subject in the form's Init event procedure on the line containing the following:
laCols[I] = STRTRAN(thisform.pgfpagerefresh1.page1.grdNav.Columns(I).ControlSource, ;
"premium.", "C_PREMIUM.", 1, 1, 1)
The columns have been bound to a table's fields on design time, and it's Init, not Load - this is what throws me off my wits!
Do I miss...... but this one hadn't.
No, this thread is back on: even with the columns' ControlSource
assigned at design time, the "'Columns' not an object" error still occurs.
"Combobox" made from grid, textbox and c
in txtCombo.Value (from a ControlSource
= Table) into csearchstring, so I have the following code in the container's Init method:
IF Type(.grdCombo.Column1.ControlSource) = 'N' && Numerical, etc. –– Grid RecordSource = Table; Column ControlSource = Field (C)
.txtCombo.csearchstring = TRIM(STR(.txtCombo.Value))
.txtCombo.csearchstring = .txtCombo.Value
When I try to open the form
"ControlSource property must contain a variable"
Thread ID: 36621 Allen Belkin "ControlSource
property must contain a variable" When I use a textbox to display information that is not to be edited, I sometimes want to use FoxPro functions to format the display, combine data from fields, etc. For example, the control source of the textbox (in a grid or otherwise) might be:
Often I am able to do this without problems. However, I frequently get the message:
"A data source or ControlSource
property must contain a variable"
I can't find any rhyme or reason to why I can do this sometimes or other times, I can't. I doesn't seem to matter if the control is ReadOnly or not Enabled. I've
"Invalid Cursor State" binding SQL Text to EditBox
16 REPORTABLE_QTY Numeric 11 4 Yes
** Total ** 270
Whenever I attempt to add an EditBox with the ControlSource
'photo' must be 'PHOTO'
Thread ID: 14770 John Zylstra 'photo' must be 'PHOTO' Dear John
I have copied your program and it works like a charm ,with a little modification.
Try this :
FOR n=1 TO FCOUNT()
IF FIELD(n)<>'PHOTO' && <==== 'photo' must be 'PHOTO'
Thread ID: 67378 Gerrit Masee (Not)Scrolling grid Hello Fox-users,
I face the following issue:
I have a GRID in which I would like to show the user a fixed number of records (let's say 10 records)
I have set the Controlsource
to the given table and have set the fields to the specific column properties.
I have set ScrollBars property to 0-None.
Before showing the GRID I select the table and do a "SET FILTER TO" to limit the numbor of records (knowing thereby that
the number of records does not exeed the number of rows)
All goes well, but somehow the user can still scroll with the mousewheel and let the records disappear from the grid.
How to avoid this behavior?
Thanks in advance,
A number in Form2 changed the number in Form1 that shouldn't be.
Thread ID: 85033 Dan-Yeung A number in Form2 changed the number in Form1 that shouldn't be. When user clicks a button in Form1, it opens up Form2. I added "set step on" after the code that opens Form2, but it did not stopped when Form2 was still open. When I press F8, it continued until the procedure was ended. Why was it not after Form1 was finished? Here are the codes:
o.oapp.doform("FORM2", txtid, vendorid)
set step on
A number was changed in Form2 that changed the number in a grid in
Form1 which shouldn't. Becaues the change in Form2 saved to Table2 and the controlSource
of the grid in Form1 was Table1.price. I wanted to step through the codes after
A tricky Grid problem
the way out. The real challenge before me is to be able to assign the Grid.Column(i).ControlSource
Can someone show the way out.
Thread ID: 319432 Manik Chamara ACTIVECONTROL Hi experts,
In the When event of a button i want to get controlsource
of the textbox, editbox ,combobox etc... which is previously positioned.
To archive this i used "THISFORM.ACTIVECONTROL.CONTROLSOURCE". my aim was success.
But for Grid controls i cant use this. I wanna return recordsourse of a grid or controlsource
of a column which is focused previously.
please help me to solve this urgently.
add checkbox to grid
Thread ID: 362213 Noel Cris add checkbox to grid Hi folks
why do I get this error?
Adding a checkbox to a grid column
Thread ID: 25140 Ron Haggin Adding a checkbox to a grid column I have a class lib called MyLib and a checkbox within that lib called MyCheckbox (the names have been changed to protect the innocent). I'm trying to add this checkbox to a gri...
adding a column in a grid
Thread ID: 227102 pat mazuel adding a column in a grid Hi,
In the init method of my form I am adding a column to my grid using the below code
the grid's record source is a table called clients_facture
In this new column I want to see the result of a calculation prix_uni * quanti , 2 fields from the table clients_facture
The column gets added, and no error messages, but I can see the result of the calculation.
I tried using a controlsource but that didn't work, but neither does the value property.
This grid is a readonly, but I make it readonly once the new column has been added.
Adding Header.Click() event at runtime
Thread ID: 268547 Bong Bungalan Adding Header.Click() event at runtime Hi to the respected members in this awesome Foxpro forum. I would like to express my gratitude to all active members who were and are willing to share their experties thru which I owe you my progress in learning VFP. In my practice project, I am now preparing for report creation. The Forms are completed though there are few features I want to add on my project as soon as I see it right to add.
One of it is adding a Sort Routine in the interactive SearchForm. if the user clicks on the Grid's Header whose Column's ControlSource is indexed and if not, it will do nothing. For you guys to understand better, below is the pseudo code of the class
Adjust Array Manually
Thread ID: 22965 Ken Blum Adjust Array Manually OK, I've been confused about this for xx years and I guess it's time to figure it out.
I have a ComboBox on a form, and am attempting to useit as a Drop Down Combo. RowSource is an Array ...
Alternative to SCATTER/GATHER
Thread ID: 390062 Benny Thomas Alternative to SCATTER/GATHER All these years I have been using SCATTER MEMVAR MEMO and GATHER MEMVAR MEMO to display data from table on data entry form for editing then saving it back to table (my textbox.controlsource = m.fieldname). Obviously, this is not the right direction (after having seen comments from experts here). One suggestion is to use SCATTER NAME command. I would be grateful if somebody can give me some idea on how to display data on form to edit with this command and then save to table or some other better method. What will be controlsource for the text boxes in case of SCATTER NAME?
Another Beginner Question
Thread ID: 5243 Pat Svoboda Another Beginner Question I'm building a form with several textboxes, 2 Comboboxes, next, previous,save, edit, cancel,
add, print, search and exit buttons. My textboxes have the controlsource from a view, my comboboxes have the controlsource of 2 lookuptables in the dataenviroment. I have used following code in my 'when' event of the comboxes to sort records:
Locate for "value" = this.value
My comboboxes are sorting fine.My problem is that my Next and previous buttons do not filter out the selected records for the specified value in the comobox.
My cmdNextbutton right now runs through the whole recordset, I am using the following code.
Skip 1 in "view
Another combobox question
Thread ID: 7534 Igor Sandler Another combobox question Hello everybody,
I am very new to VFP so if somebody can help, please!!!!!
Got a problem with famous combobox (or maybe combobox got problem with me).
Combobox is DropDown,
BoundColumn = 1
ControlSource = MyView.cAccount_No( Character)
RowSource = MyView.cAccount_No,cAccount_Desc, IID(IID is a primary key as AutoPrimary)
RowSourceType = 6
BoundTo = .F.
That’s what I am trying to do. If usre will enter partial cAccount_No I’d like the combobox’s DropDown list to drop down (which I can do with ), the DropDown list should contain records that begins with the partial entry (user entered “1042”, list should have records that begins from “1042
Thread ID: 20179 julia julianna another question... hi... I have again a problem with this.. why is it that error operator operand mismatch will occur.
.recordsource = ''
where ml_stat = 'a...
Any Solution To DateTimePicker Error
Thread ID: 7000 Adel Kadi Any Solution To DateTimePicker Error Hi Everybody
I have a form that has a field (Invoice_date) and i like very much to use the Dropdown DTPicker control
Now, I am realy tired from trying and trying hundred times to avoid the control error messages either ("The control is read only") or others so everybody told me read this article from microsoft so i read all of them but end up with the same thing and here what i tried I am still hoping somebody will help from the experts site even i can send the form by email if i leave ControlSource Empty I got it and if i connect it to the field i still get it.
I changed the Olecontrol name to DTPicker
tha tabe is "Invoice"
the field is "Inv
Thread ID: 397924 randhir kumar appending conflict sir
i have a customer table in a sale database having fields custid(int),custname(varchar),custaddress,custcontact fields etc. i have used candidate key on custid field. i have a form nam...
appending in LAN, auto-increment, buffering?
Thread ID: 86141 Scott Johnstone appending in LAN, auto-increment, buffering? Hi Experts, this is a bit of a newbie question, but I'd
like to be using the correct procedure before I get to far into it.
I'm using optimitstic table buffering and can edit & tableupdate
any edits for files. What about appending records? In the past
I used scatter/gather but now using buffering & the fields as
controlsource for controls - how do I append a record? -
Append blank first, then add the info I want?
(In the past I filled the memvars, then append blank & gather)
If so, then how do I handle the auto-increment value of the
appended record. It would seem in the private datasession
that the appended record
Array in textboxes on form
Thread ID: 26593 Troy Reganall Array in textboxes on form Hello,
I am trying to store user input from textboxes on a form to an array like this;
dimension dateval(10) && in ini event or calling program before form
Arrays + Assoc Access
DEFINE statement in Objects e.g. you cant add
APerson[_PERSON_NAME_] as a ControlSource for a pulldown in the properties.
tho you can do this.controlsource = APerson[_PERSON_NAME_] in the INIT() event
Ask to save or Not.
Thread ID: 240311 Rajneesh Talwar Ask to save or Not. Hi, Dear Expert,
I am open a table for editing purpose in a grid I used the following commands for the same :
Assignng values of memvars in textboxes
Thread ID: 26189 Joey Bancud Assignng values of memvars in textboxes hi foxperts
i have a form with textboxes having controlsource assigned with m.variablename at design time. the variables
are the same with the field names from a table opened at load event. what i want to do is assign the current field
values to the memory variables and display it in the textboxes.
in the load event of my form..
scatter memvar && same field names assigned to textboxes prefixed with m.
when the form appears, it doesn't display the values of the first record. only when i move to the next record
and re-assign the memvars with scatter memvar and refresh will it show