It doesn't work because it's illegal - labels can't have values. You need to use a textbox, dropdown or any of the other controls that have dynamic data. Labels are static and fixed.Im a little confused myself why variabel = lblname dosnt work
Like I said before, variablename = [field] will work just fine. Just refer to the field name although you could also use the name of the textbox if it was different (usually it isn't though). Note that you must use the square brackets when referring to fields or controls.If anyone has any ideas on how to just take data from fields in a database im all ears.
Originally posted by: BFG10K
It doesn't work because it's illegal - labels can't have values. You need to use a textbox, dropdown or any of the other controls that have dynamic data. Labels are static and fixed.Im a little confused myself why variabel = lblname dosnt work
Like I said before, variablename = [field] will work just fine. Just refer to the field name although you could also use the name of the textbox if it was different (usually it isn't though). Note that you must use the square brackets when referring to fields or controls.If anyone has any ideas on how to just take data from fields in a database im all ears.
I've just tried it now (on a textbox with a field bound to it) and it worked perfectly.
I don't know what you mean. If you don't use square brackets when referring to fields or controls Access thinks you're referring to variables and will give you an error about them not being defined.Uhh, no. This isn't VBA
Originally posted by: BFG10K
It doesn't work because it's illegal - labels can't have values. You need to use a textbox, dropdown or any of the other controls that have dynamic data. Labels are static and fixed.
Originally posted by: BFG10K
Of course label properties can be manipulated, labels just can't have any data attached to them. If you want to do that in Access you need anything other than a label - textbox, dropdown etc.
If you click on the properties of a label the "data" tab is empty for this very reason. There is no way you can do something like assign records to a label from a query. I guess in theory you could try and stick the data into the caption section but that's just clumsy.