473,385 Members | 1,531 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamically changing the control source of a field

Seth Schrock
2,965 Expert 2GB
I haven't tried anything yet, but I was wondering if anyone else has. I'm wanting to concatenate several fields together along with static text and I want the ability to change the arrangement of the fields in a textbox without having to change the design view. My thought is that I would have a table store the arrangement and when the form or report opens, it gets its control source from the table. Is this just as straightforward as Me.textbox.ControlSource = "=[Field1] & ' - ' & [Field2]"?, getting everything within the double quotes from a DLookup? Is there performance issues doing this? Is there a better system? This idea came to me while I was driving so I couldn't test it out, but I was just wondering if anyone has suggestions or warnings about this idea.
Oct 12 '16 #1
2 2625
jforbes
1,107 Expert 1GB
I think you are on the right track and don't think you will have any problems.

I've done some stuff like this in the past and it's worked great. This article is also changes the RowSource on the fly and Access didn't have a problem performance wise: Combobox Stop Autofilling Text portion from selected item
Oct 13 '16 #2
Seth Schrock
2,965 Expert 2GB
Then that is the path I'll take in my testing. Thanks.
Oct 13 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ogilby1 | last post by:
when using/writing dlookup the expression should be placed in the control source field of the properties? under what circumstances is it "put" in the beforeupdate" or "afterupdate"?
3
by: Geoff Matthews | last post by:
I apologize for the basic question, but MS's documentation has been no help at all. I'm working on a database, and need to create a form for schedules, M-F, 8-4. I've settled on an easy way out,...
5
by: sparks | last post by:
This morning I was adding some fields in a database. I double clicked on the control source field to highlight and copy the control name into the name of the control..well I have done this a...
0
by: John Crowley | last post by:
I'm having an odd problem with viewstate and a dynamically created control inside a repeater template. Basically, I have a repeater setup like this in the aspx:
4
by: Anja | last post by:
Hi everyone, I am trying to use the expression builder to create input to a control in an Access report. I have a table called Records and I want to select the minimum date for a record where...
2
by: John | last post by:
Hi Everyone, I have a question about dynamically changing the length of a varchar(n) field, in case the value I'm trying to insert is too big and will give a "truncated" error, but before the...
15
beacon
by: beacon | last post by:
Hi everybody, Using Access 2003. I'm trying to dynamically set the record source for the current form and set the control source for a text box to input data to one of three tables. I have a...
7
by: MataHari | last post by:
I have 2 columns titled Time In and Time Out. Time elapsed between the two columns is given in a third column titled by code =DateDiff("h",,) but I want all time under 1 hour to register as an hour,...
5
by: bessora | last post by:
I have a form and combo boxes on it. Depending on what is current record of a form, I need to dynamically (in the code) change the row source of at least one combo box. Problem is that when I read...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.