Here it is I have four fields on a form that come from a query. Fields a,b,c,d.
a is a text field that looks like a date 1/2/2009, b is a time that looks like 8:00:00 AM and c is a concatanated text field 1/2/2009 8:00:00 AM.
Now d is a Date/Time Field formated as General date . I want to set the control property of d to transfer the date which is a text field into the d field so it will be an actual date. So I entered as the control property =[C] . I saved the record , closed the form and looked at the table that has a,b,c,d . The d field remains empty. Why ?? I also tried as the control property =CDate([C]) still doesn't work. Lastly I created an update query on the table and tried to update the d field and no go. Help
8 1687 NeoPa 32,579
Recognized Expert Moderator MVP
You can only sensibly do this with the Update Query approach.
Having said that of course, the whole concept is highly dodgy. You really do not want to duplicate data in your database instead of simply working it out on the fly. See Normalisation and Table structures for a full explanation why.
I realize what you are saying but to avoid having someone type in the date and time in a field on the form, All they have to do is type the date and from a pull down combo box select the time, You might appreciate the problem of entering all the / and colons and getting the date corectly formated on data entry. I figured I could assist with pull downs. I don't mind the duplication since this project will not contain thousands of records. Ken
NeoPa 32,579
Recognized Expert Moderator MVP @dupontk
I doubt you do, or at least you don't understand the full ramifications of that approach.
That said, it's really your funeral and if you want to update the field (d) then I can help you do that.
Let's take it from what you have already tried. Can you post the SQL for the update query you tried. From that I will see your actual field names and table name etc.
- UPDATE test SET test.d = CDate([C]), test.g = CDate([f]);
I tried it with d=[C] and g = [F]
NeoPa 32,579
Recognized Expert Moderator MVP
I would expect that to work Ken.
Can you explain what did happen when it was run.
I'm ignoring the [G] bit as this wasn't part of the original question. For (good) reasons of simplification I expect.
When I ran the Update query it said 1 record not updated due to data type conversion.
Hey I got it. I had to run 2 update queries . I thank you for the help. Your invited to the funeral.
NeoPa 32,579
Recognized Expert Moderator MVP @dupontk
You shouldn't need two queries (I'm assuming you're talking about one for each field). Did you note the data in the record that didn't get updated? It probably contained some string data that couldn't be interpreted as a date for some reason. @dupontk
Things going that well huh :D
No worries, we can help you past some of the difficulties.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Drew |
last post by:
I have a db table like the following,
UID, int auto-increment
RegNo
Person
Relation
YearsKnown
Now here is some sample data from this table,
|
by: Lumpierbritches |
last post by:
Thank you once again for any and all assistance. I'm building an application
that's getting quite bulky due to the number of forms, macros and procedures. I
was wondering if there's a way to use 1 (one) unbound form, if all the fields
are the same for multiple forms populating them with Queries?
I have a makeshif menu form with command buttons and I would like to eliminate
all the forms and replace them with one unbound form for three...
|
by: emmaruwa |
last post by:
I have a form with two text boxes (in its details section) that pull data from two fields in my database table. This same form also has a button beside the text boxes which is supposed to open another form and populate that form with a record from the table using the data in the previous two text boxes as record selection criteria. However, it seems Access 2003 only uses one of the 2 text box data as criteria, i.e., no provision for using two...
|
by: Mary |
last post by:
I'll pulling my hair out on this one and would be so appreciative of
any help.
I am creating a data entry form to enter results of a student survey.
There are 40 questions on the survey. The first 7 have to do with
respondent information like grade, class and age. I have those in a
table with a PK of RespondentId, which is autonumbered. Questions 8-40
all have the same format. For these questions I have a table set up
with the...
|
by: wideasleep |
last post by:
Hello,
I have a form that has a combo box that populates other fields. This works great but it doesn't save that information in the table where those fields are coming from. The only one that's getting saved is the combo box information.
I have four fields that are getting populated. The following is the code I have for them.
=.(1)
=.(2)
=.(3)
=.(4)
| |
by: prosad |
last post by:
hello,
Just solved a problem using Javascript onclick, can click on any cell in a dynamic table and it will pass the innerText object value to my form text field. parts of code given below:
<script type="text/javascript">
function select_cell(obj)
{
document.getElementById('complaint').value = obj.innerText;
document.getElementById('selected_form');
}
|
by: daverskully |
last post by:
I have two tables created and want to link two forms created from these tables so that specific fields are populated once one field is selected, but not all fields being populated, with a new record being saved into one of the tables.
Tables:
1. StaticInfo
contains fields:
1) Department
2) DepartmentNumber
3) AccountExecutive
and 7 yes/no fields
|
by: daverskully |
last post by:
I have two tables created and want to link two forms created from these tables so that specific fields are populated once one field is selected, but not all fields being populated, with a new record being saved into one of the tables.
Tables:
1. StaticInfo
contains fields:
1) Department
2) DepartmentNumber
3) AccountExecutive
and 7 yes/no fields
|
by: pzh20 |
last post by:
I have an unbound form/subform where I populate a combo box on the main form, and using the onchange event, display fields from a table in a datasheet subform.
I want to add a new record via the subform, allowing the user to type certain fields but complete other fields via code in the beforeinsert event as follows
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.Kitchen = Me.Parent.Kitchen(2)
Me.lookupRoute = Me.Parent.Kitchen(1)
...
|
by: davenumber40 |
last post by:
I’m creating a small database in Access 2003(XP) to track issues during software testing. As far as databases go, it’s going to be a relatively small, short term project (No more than 20,000 records in the main table over about 2 months).
I have a main table (Issues) that is populated by a form (IssueAdds). On my form there is a combobox to select Opened by (who created the record). That list is populated by a table called Contacts.
Here...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |