Got the answer it is as follows:
Left([TableName]![FieldName],2) & Right([TableName]![FieldName],4)
User Profile
Collapse
-
I am sorry but I am not an expert at query syntax and when I insert
Select Format(DateFiel d,"MM/yyyy") From TableName (using my table name of course, it gives me an error. As I said I am not an expert so I am copying exactly what you give me above.Leave a comment:
-
I tried the above and no matter what I did got a Syntax error. Please consider the following:
Date Completed is a field in the table and is restricted to Month/Year
I want it to use the date in the field date as a look up to but only use the Month/Year to run the query.
Does that help?Leave a comment:
-
Query syntax results date format
I have a field that has a date format of mm/dd/yyyy and I need this date to provide a result of mm/yyyy to answer a parameter for another field. I need, in the query, for the answer to the question of Date Completed 01/2009 be provided from the field of Field Date 01/22/2009. Does this question make sense?
Basically they are the same but the date stored in the Date completed does not need to be the full date just the month and year... -
Sorry, the main form, which used to show the detail of the location only (city state etc) is set to data entry no. The subform which is used to log all the activity for the location is set to data entry yes. I do not want them to edit the sub form at all just add new activity only.
I hope this answers the question.Leave a comment:
-
Ok I will try to clerify
I have a form that could potentially have 1,000 clients. Each client could have 10 entries for dates of activity, which are listed in a sub form that appears on the main so the user things it is all one record not realizing they are stored in two different tables. They appear to be one form. The problem is I do not want to show all 10 entries in the sub form but provide just a blank record so they can add the...Leave a comment:
-
Form is Data Entry No or the Sub Form does not show up. The sub form is Data Entry Yes but it still shows all entries for a particular location although I have the sub form set to No Edits. You can only make additions.Leave a comment:
-
Sub form visible in Form needs to hide previous entries
I have a form that opens with an embedded subform visible for data entry of new data only. The form is based of a select query so I can show data from multiple tables for verification but the sub forms data is the actual table. I need the sub form to open with a blank record. I do not want to show previous entries because this is to be used to add new records only and not edit anything. Can anyone help. -
Never mind I found it. I was trying to name the field the same as the actual field. I am having one of those days. All works good.Leave a comment:
-
One more problem. When I write the same same code for the mobile phone I get a "circular reference" error. I really need them to work together. Any suggestions?Leave a comment:
-
Ugh! I knew that. You are a genious....It works perfectly now. Thanks so much.Leave a comment:
-
I am getting there here is what I have
Code:BusinessPhonePreferred: IIf([isChecked],[BusinessPhone],"")
If I type in Business it gives me a result. If I type nothing the field is left blank. If I uncheck the field and run it and type in Business at isChecked it gives me the phone number when I don't want it.
I am missing something....Leave a comment:
-
Not an expert programmer. I am not having any luck defining the new field(s). Keep in mind I have to set criteria on two fields one may display information and the other not if one is checked (BusinessPhone) and the other (MobilePhone) is not checked.Leave a comment:
-
It is a query. I am running a query to export to Excel. I need something in the criteria of that field to only display the contents for that user if Business is checked.Leave a comment:
-
Sorry forgive me it is not a yes/no text however a check box.Leave a comment:
-
Display contents of a field based on another field being yes
I have a phone number field (BusinessPhone) that I only want to display in my query results if the user has selected yes (yes/no field) in another field (Business Y/N field).
The premise is that they can choose to use their business phone, mobile phone or both. If they choose yes in business their business phone would appear in the field BusinessPhone however if they choose no the query should return nothing in that field for that... -
-
No I don't understand post 8. I am not an expert programmer. I do understand however the difference between a table and a database though. That was a little harsh.Leave a comment:
-
No matter what I do this code does not work. I will keep searching.Leave a comment:
-
I went ahead and tried it removing MyDB.Execute "DELETE FROM MyTable" and still got the Invalid SQL Statement; expected 'Delete', 'Insert', 'Procedure', 'Select', or 'Update' errorLeave a comment:
No activity results to display
Show More
Leave a comment: