Design Tab - Data Definition
Oct 25, 2014
I am feeling around my database which was upgraded from Access 2003 to Access 2013. I am getting error messages and I was trying to figure out why a particular query gave an error. I clicked on "data definition" and I think it opened a new query, but it will not let me close it. The message is invalid SQL statement, expected Delete, Insert, Procedure, Select or Update. There is no way to cancel this.
I had to use the task manager to close the database, not what I like to do.
What do you do with "data definition"?
View Replies
ADVERTISEMENT
Aug 4, 2014
I have a query based on a query, when I added a new field to the base query, this field did not appear in the list of fields in the design definition when I try and add to the upper query. It just shows the original fields only.
Same thing happened in a field on a report - I had to delete the field and create it again...
View 4 Replies
View Related
Sep 5, 2007
I generally use Cognos for my queries, so the overly user friendlyness of access is confusing me and im not proficient enough in sql to just go in and edit the code...
How do i generate a query that groups data in unique ways in the result, but does not change the data in the originating table.
For example:
I have the column tbemployment.dept . In a crosstab query i want everybody that isnt tbvoter.dept='BELLS' to be counted as 'other'.
In Cognos i would do this in the 'data definition' window for that field and use 'if (tbvoter.dept<> 'BELLS') then ('other') else (tbvoter.dept)'
How do i do this in access?
View 3 Replies
View Related
Feb 19, 2015
I'd like to use DLookup, DCount etc. on a SQL string held within the VBA code itself. Something like:
stSQL = "SELECT * From Contacts"
MsgBox DCount("Contact_ID", stSQL, "Deceased = False")
I'm trying to avoid creating lots of queries.
View 4 Replies
View Related
Jan 30, 2013
I am creating a database for my school and I can't create a relationship between two tables. There are only two tables and I need them to be one-to-many however it says there is an 'invalid field definition'. I have attached the database.
View 3 Replies
View Related
Jun 6, 2013
I am trying to write some fields to an access table definition. It is working for the most part except that I want to write some of the fields as dbText and others as dbDate. For some reason it is writing all of them as dbDate and I don't know why.
Code:
additionalColumns = Array("a","b","c","d","e","f")
'add additonal columns to report
For i = LBound(additionalColumns) To UBound(additionalColumns)
MsgBox additionalColumns(i)
If additionalColumns(i).Value = "a" OR "b" Then
Set columnNames = xlsht.Cells(1, additionalColumns(i))
Set FieldName = tb1.CreateField(additionalColumns(i), dbDate, 10)
tb1.Fields.Append FieldName
Else
Set columnNames = xlsht.Cells(1, additionalColumns(i))
Set FieldName = tb1.CreateField(additionalColumns(i), dbText, 150)
tb1.Fields.Append FieldName
End If
Next i
View 3 Replies
View Related
Dec 19, 2006
In this thread:
http://www.access-programmers.co.uk/forums/showthread.php?p=549287#post549287
I had a problem. Now I decided to just make two tables, one with sales for a "passer by" and/or directly to a client without a case/labour costs. And a table for sales in relation to a case with labour costs etc. I guess I still m*ssed up on that part and have to make do with that decision (kind of like I depicted in the photoshopped image).
For invoicenumbers I want to use DDMMYYYYHHMM. When adding that field to the design of a table, how do I go about that? Do I just use a Text field and create an input mask for that? Or do I need to use a number format with a certain input mask? Or would it be wiser just to use the date/time type of field and give it a new inputmask? I guess 000000000000 would be the one for that, right? Although I read the help file I do not know if I should use ;0; behind those first group of zero's or not. Yes it is a mandatory field, but it will fill in itself as soon as a product is typed in in the product/invoice list, with a default value of the current date and time.
I need to brush up my knowledge on the formatting for that so that 28-05-1975 19:55 will be displayed and stored as 280519751955. Or is that also done automatically by using that input mask? Or will that give an error when Date or Time() etc. is used for that field in VBA?
Just a few questions I need some help with, I've been trying some stuff but it really doesn't "stick".
And if anyone has some time, I could really use some general advice/ideas for setting up the invoicing part differently for a new version of the db yet to come in the future.
View 3 Replies
View Related
Jun 24, 2015
I am using Windows 8.1 64 bit system. Into attached access file (OfferStudy.accdb) ,trying to load an activeX TreeView control by defining into a form module. First, I created an empty form and activeX Treeview control.When I define tv variable As TreeView as created in application, it is changing as Dim tv As treeView instead of TreeView. After my code is completed,an error message ("user-defined type not defined") is returning as shown in attached (DebugError.png)file.
I suppose that there is some conflict on creating activeX control on my Access 2013 application.
View 4 Replies
View Related
Jun 9, 2014
(named: Invalid Field Definition - Unable to set up cascade update but I have done what the moderator advised and have not been able to fix a very similar problem.
I have planned a database and must adhere to the plan or change it and basically I initially said that I would like to enforce referential integrity to synchronise my tables and I would also like to cascade update and delete to save input time because changes will be automated between table (where fields are connected.).
I have attached a plan I did if that makes the purpose of my database clearer.I have attached my database and have established the relationships* without referential integrity enforced I would like between my tables but don't know how to make them one-to-many relationships nor can I enable cascade update or cascade delete or enforce referential integrity.
I am new to databases (and to this forum) and have been promised by my line manager that I won't have to specialise, I don't think I have created the relationships but they are supposed to be between Vehicle ID and Hire Number, and Customer ID and Hire Number.
View 1 Replies
View Related
Apr 25, 2014
I am developing a calender to display HOTEL room occupancy (past,present) and combine with future "outlook" dates and 1/0 values from active registrations that go beyond the present date.
I am working with MS ACCESS 2007. My problem is ONE SPECIFIC QUERY AND IIF STATEMENT. I want to concatenate some text (using &) along with numbers converted to text (using the CSTr function). I am using iif function and I want to use the full text string as a variable argument to be executed in the iif function. The result of the &concatenate is a text field like [p1] or [p2] or [p#] with numbers 1-31.
But, I do not want the final result as the argument. I want the query and iif to use the string expression written into the argument as the variable argument that can be calculated based on OTHER numbers that change everyday in the daily run of the calender.
The field in the statement [calc number] is a date conversion factor that changes everyday.
I want the iif statement to execute using the string as a variable argument. I am writing only within the QUERY to define the query object. I am not writing into any SQL module or code. My field definition and iif statement is below (calc number changes everyday)
CalDate18: iif(18 greater date();"[p" & [calc number] & "]";0
I do not have greater-than key on this international keyboard !
When I use this in an update query, I get format conversion error. When I use the same definition in MAKE-TABLE query, it gives the resolved value "[p1]" for the value of [CalDate18] ......... that is not what I want.
I want the string to be taken literally and executed. Seems there may be a special character to precede the argument or WRAP the argument such as done in Excel. Example # "[p" & [calc number] & "]" #
View 7 Replies
View Related
Nov 29, 2005
Greetings.. I am attempting to teach myself Access but I am having trouble trying to figure out how to implement into my database the features I need my enduser to have.
Basically I am trying to create a Contacts database and I want the "form" that my end user enters data into to look like this (all examples are minimalist because I am looking for specific logical answers to solving my problems, not field suggestions):
Name: [textbox]
Phone: [textbox]
Email: [textbox]
Now I need to have Phone and Email each in their own tables, or in some way seperated so that I can retrieve a list of emails or phones without duplicates.
My initial attempt was to create the tables:
*key
NAMEtable
*Name
Phone (related to PHONEtable.Phone)
Email (related to EMAILtable.Email)
PHONEtable
*Phone
EMAILtable
*Email
Now the problem with that setup is that I cannot create a new entry into NAMEtable unless the specific Phone AND/OR Email are ALREADY listed inside their respective tables.
What I need to be able to do is give my user the ability to use a "form" with 3 fields, that will do the following:
Allow a new Name without a Phone or Email.
Allow a new Name WITH a Phone and/or an Email.
Allow a 2 different Names to have the same Email, but pointing to only 1 instance of that email in a different table.
(which it already does all if the Email and Phone already exist in their tables, I need it to be able to create new entrys into those tables from the form if they don't already exist). I also need to be able to enter in new Emails from a different form2 that dont have any relation to any persons in Name (which isn't a problem either at the moment since I just open the Email table and enter data).
I am unsure how to execute this first forms dilema though, I am assuming my database design is fine and it has something to do with some formality or code that I am missing to be able to do what I want. If so could someone help me out and make some suggestions? Or if my design is way off and there is a better way to be able to enter and store a Name, Email, and Phone from a form that relates back to a single contact and prevents duplicates then please let me know. Thanks
Also here is another post I made in a different forum but wasn't able to get quite the answers or help I was looking for.
"Name [textbox]
Email [textbox]
if the email the user is entering isnt already in the database it will not create a new row in email.email and then link contacts.email to that specific email.email...........
for example if
contacts NAME , EMAIL
row1 = bob , email.email row1
row2 = bobswife, email.email row1
email Email
row1 = bob@bob.com
then I open a form that will have 2 members, both pointing to the same email.
1 of 2
Name: [bob]
Email: [bob@bob.com]
2 of 2
Name: [bobswife]
Email: [bob@bob.com]
Ok, lets say I go to create a new member
I can do this just fine:
Try1
3 of 3
Name: [bobsson]
Email: [bob@bob.com]
What I can't do but need to be able to do is:
Try2
3 of 3
Name: [bobsson]
Email: [bobson@bob.com]
It will return an error stating that the email isnt in the email table. I need to know how to get Try2 to do what I want so that when I enter 3 of 3 my database looks like this:
contacts NAME , EMAIL
row1 = bob , email.email row1
row2 = bobswife, email.email row1
row3 = bobsson , email.email row2
email Email
row1 = bob@bob.com
row2 = bobsson@bob.com"
Anyways.. thanks again for any help.
View 2 Replies
View Related
Jan 13, 2006
Hello All,
So much has been discussed on the main boards about the techniques available to solve technical problems.
When you read books on data base design; much is discussed on the structure of databases and much more is left out concerning how people actually work. A properly designed data base enhances work flow and changes workers bad work habits into useful and efficient ones.
My primary market is emerging small businesses. Typically my customers have been using spread sheets and Quick Books to keep track of ordering, scheduling, resource allocation, and accounting.
As you can imagine it’s a disaster. Individuals in the company have spent much time working out their problems in Excel. This poses a real challenge, many of the user are very emotionally attached to the existing non-system, and they are often determined that the “new database” will function in the same way as their tried an true spread sheets.
So to open the discussion.
I’m curious. What do ya’ll do to ameliorate this and what is the general theme you prefer when creating a system for people that have never had one before?
View 3 Replies
View Related
Jul 14, 2005
Still not sure how to do this, after I convert my database and create an mde file few changes might accrue in the future, I have tried to make some changes for testing purpose and then create a new mde file and saved it with replacing the older one but I had lost my new data which was entered in the old mde file?
Q: how can I make the new change on my original file and not lose my new data in my mde file.
View 3 Replies
View Related
Apr 28, 2005
First of all, I want to say Thank you to everyone in this forum I have been reading just about every question in each Topic and I have pick up a lot more than I tough I knew. [Thank you]! I not sure how to ask this question or better yet write it. Here is my Situation I work for the NAVY as an Enlisted Personnel station in (New Orleans, LA) I have created a few databases for my workcenter and were simple enough that I managed. Now, I been task to help create a Call Center DataBase to keep track of Phone Calls and Issues the Agents(Employer received Daily) As well run other reports.
I am Including a copy of what I done so far. Can someone advise me about my Database Design? Does it makes sense? Are the Relationship seen good?
my frmCustomer is based on query (qSupport) I would like to know if the form and the SubForm are set up ok where I can have the Agents input data.
And one more thing on the frmMenu I have a few Text Boxes where I would like to display the total Amouth of Phone Calls received - as well the ones pending and Close? Any Criticism or Suggestion are more than welcome.
I hope my Question / Request makes sense. Thank you ....
V/R,
MrDix
View 3 Replies
View Related
Feb 9, 2015
I receive attendance data in Excel with two columns, StaffCode and DateTime, from a biometric machine.
Each staff member clocks in in the morning and clocks out in the evening.
Optionally, they also clock out for lunch and back in after lunch.
Each StaffCode may therefore have 2 or 4 entries per day of attendance.
Staff details (name and department) are specified in a related table.
I wish to design two reports in Access as follows:
1. Daily Attendance Report (Filtered by current date or custom parameter)
Department (1st Group level)
StaffName ClockedIn LunchOut LunchIn ClockedOut
2. Weekly/Monthly Attendance Report (filtered by current week/month or custom parameter)
Department (1st Group level)
Date (2nd Group level)
StaffName ClockedIn LunchOut LunchIn ClockedOut
View 1 Replies
View Related
Feb 9, 2005
I was wondering if there is a way to export the Table Design Structure:
1) Field Name
2) Data Type
3) Description
Into a Spreadsheet.
I was able to do this a long time ago, but can't seem to remember. I'm using Access 2000.
Thanks!
Joe
View 3 Replies
View Related
Sep 16, 2013
I want to export details from a table in access to a word document or any other document that will keep the current design and let me make changes afterwards.
View 4 Replies
View Related
Apr 17, 2015
how to design a form that can pull multiple invoices data related to the same purchase order number?
View 14 Replies
View Related
Oct 6, 2014
I have had to use my first crosstab queries.
I now understand that when opening and saving crosstab queries Access (2010) runs that query to ascertain the column names. Unless you hard-code them. Running the query takes at least 20 minutes.
I have hard-coded where I can, but one report takes arbitrary dates so I can't hard-code them.
I believe that turning off AutoCorrect might make a difference to whether the query runs - but I don't want to turn it off.
View 6 Replies
View Related
May 18, 2007
I have a sub form in DataSheet view and I would like to lock the design so that the User should not change the layout
Even when I set the property of the Datasheet “Allow Design Changes: Design View Only” users are able to unhide the hidden columns and they can also change the size of the column by dragging the column end line
Does any one know how to lock the design of datasheet ( I am using this sub form datasheet for data entry but do not want users to change the layout)
Thanks
Rahul
View 1 Replies
View Related
Mar 10, 2005
I have a form opening up in the background. Its job is to check a value every 2 minutes and trigger a chain of events that will shut the database down if I want to make repairs.
I want the form to be invisible. I have changed it's properties to visible= "No"
I have never had a form invisible before. What is the expected result?
It's still there when I toggle.
The form looks blank (I had a text box on it, explaining what it was for- and this is gone when it's "invisible"
Should any hint of the form still be there?
How invisible is "invisible"?
I am expecting no hint of the form to be there. Am I expecting too much?
Or am I doing somethng wrong?
View 5 Replies
View Related
May 5, 2005
I'm going to make up names and values -- I'm interested in the structure.
Table ALPHA:
COLA DAT1 DAT2 DAT3
1 5 7 9
2 4 14 8
Table BETA:
COLA_IND DAT1 DAT2 DATN
1 a b c
Table CHARLIE:
COLA_IND DAT1 DAT2
2 d e
Table DELTA:
COLA_IND DAT1 DAT2
2 f g
Ok, the idea here is that the data in table ALPHA contains data with COLA a key such that selecting 2 would yield the data row "4, 14, 8."
Now, COLA_IND is a "COLA" key for table ALPHA (sorry, I can never remember which side is called the foreign key). So, from tables BETA, CHARLIE and DELTA, I can access any row in ALPHA based on the key "COLA_IND"
Here's the fun part. When I build my query, it wants to use an inner join on the keys from all these tables... In order words:
SELECT blah blah blah INNER JOIN blah ON (ALPHA.COLA=BETA.COLA_IND) AND (ALPHA.COLA=CHARLIE.COLA_IND) AND (ALPHA.COLA=DELTA.COLA_IND)
What I'm looking to do is expand BETA, CHARLIE and DELTA with the information from ALPHA based on the key COLA_IND. I don't think this is doing what I want.
Any comments?
Thanks in advance...
View 1 Replies
View Related
Sep 10, 2007
Hey,
I've got this problem and im 95% sure its going to need a query in order to achieve this answer im looking for.
I'm creating a Software Licensing Management db and its all working lovely. However my only problem remains is the graphical representation (text box within one of the forms) of howmany licenses are/aren't(doesnt matter if this number is a +/- number) available.
In order to achieve this answer I dont think you'l need the table structure of any of my tables other than these two:
tblLicenseInformation
License_ID
LicenseDescription
NumOfLicensesPurch
SoftwareOverview_ID
tblHardwareSoftwareLicense
HSL_ID
Hardware_ID
Vender_ID
Software_ID
AppEdition_ID
AppVersion_ID
SoftwareOverview_ID
License_ID
However I would like to add a column to either of these tables named 'Availability' or something similar which will show the licenses available.
I've tried a number of Update/Append queries but all have failed. I want this Available running variable held within the table due to it not changing to much of the current db design as i baisically finished the project and they asked for it! any ideas of how to efficiently achieve this will be much appreciated!
cheers
View 3 Replies
View Related
Jun 5, 2014
I'm looking for a keyboard shortcut to expand the columns in "design view" of a query.
What I mean by this is rather than selecting all of the columns and double clicking to see the entire text, I'd like to be able to a shortcut.
The entire process as I see it involves 3 steps so I will need thesolution to the 3rd step.
(1) [ctrl+spacebar] to select initial column
(2) [shift+arrows] to select all of the columns I need
(3) [keyboard shortcut] will expand all of the columns "field" names to the size of the column heading
Alternatively, if you know of a shortcut that will expand the columns without having to select them first I'll take it!!
View 4 Replies
View Related
Mar 23, 2012
I am designing a database for my organisation. I have done most of it but am stuck on this. Ideally I would like to have a check box (in a table) that when checked a load of data is carried across from that record to a record in another table.
Given that I can't and don;t want to use VB is there anyway that this can be done easily?
View 8 Replies
View Related
Jun 25, 2007
hello everyone
i found myself trying to write this outer join query and i realised that probably i need to improve my design rather than write the query! so here goes
i've created a form which a user can navigate through to look at various jobs which have been done (its a loft insulation database)
now one of the things the users need to do is to arbitarily choose jobs for which they are going to phone up the customer and check the work was completed satisfactorily for QA purposes
the table containing information about the jobs has a yes/no field "selectedForQA" which comes up as a checkbox on the form so they can just check the jobs they decide to check up on
i wrote a query which runs on click of a a command button "send selected to QA" which is just an append query sticking primary keys of the jobs table into another table TBL_QAList which has other fields 'contacted', 'satisfactory' and 'notes' for them to check when they have phoned the customer
of course i can't simply rely on the Append query because the jobs previouly loaded into QAList will still be checked and the append will try and append the same data twice cauzing a primary key violation
i don't doubt that it must be possible to only append those records which aren't already in the table (i believe its an outer join to return the records in neither of two tables? - i could then append the results of that query?) but anyhow the fact that i'd have to do something of that sort suggests to me my design is screwed up in the first place
i know that its bad to have the same data in two tables but all i would have replicated here would be the primary key and when i present the data to the user i use the table relationships to get them all the contact details etc that doesn't get copied across tables
maybe the better solution is to have no QAList table just the jobs table (with sentToQA field) and a QADone table - then the form the user sees can get its data from a query which finds those jobs for which Jobs.selectedForQA = True AND which are not in the QADone table and when they check the done box on their form the record gets added to QADone
have i just answered my own question or is there a yet better way of doing this? or was i on the right track in the first place?
View 6 Replies
View Related