Connecting Super Type & Sub Type Entities With A Condition
Sep 21, 2004
hi friends,
i have tried had to connect sub type tabels (Saving, Checking, Loan... they have their own ids...) with super type (Account...it has account id...) on the condition of account_type (either "S","C" or "L") attribute in ACCOUNT entity.
how to joint them??? with query or with expression??
i expect help from you.........please.
........thanks.
I have a table with a field with names set to text data type and i want to change it to number data type but when i do it in design view the data get lost. I want to know if there is a way to convert the data in the field as number type and keep the data in the field.
I posted this on the end of the audit trail thread but nobody was really looking at it. I have used the script for the audit trail, and when I start changing any of the records, it comes up with the error:
13 - Type Mismatch
When I ctrl - break, and debug, it highlights the last line of the script:
Hi all, I have a problem with the following piece of code:
Private Sub cmdCautare_Click() Dim strSQL As String, strOrder As String, strWhere As String 'Select Case Me.cmbTipVersus 'Case 1 'If Me.cmbTipVersus = "" Then strSQL = "SELECT tblDosare.DosarID, tblDosare.DenumireDosar, tblDosare.CodDosar, tblDosare.DataDosar, tblInstante.Localitate, tblStadiu.Data, tblStadiu.Stadiu FROM tblInstante INNER JOIN (tblDosare LEFT JOIN tblStadiu ON tblDosare.DosarID = tblStadiu.Dosar) ON tblInstante.InstantaID = tblDosare.Instanta" strWhere = "WHERE" strOrder = "ORDER BY DosarID" If IsNull(Me.txtDenumire) Or Me.txtDenumire = "" Then Else strWhere = strWhere & "(DenumireDosar) Like '*" & Me.txtDenumire & "*'" End If If IsNull(Me.cmbStadiu) Or Me.cmbStadiu = "" Then Else strWhere = strWhere & "(DenumireDosar) Like '" & Me.txtDenumire & "*' & " And " & (Stadiu) Like '" & Me.cmbStadiu & "*'" End If DoCmd.OpenForm "frmRezultateCautare", acNormal Forms!frmRezultateCautare!lstRezultate.RowSource = strSQL & " " & strWhere & "" & strOrder 'End If 'End Select End Sub
And on this line strWhere = strWhere & "(DenumireDosar) Like '" & Me.txtDenumire & "*' & " And " & (Stadiu) Like '" & Me.cmbStadiu & "*'" i have an error message type mismatch. If i do the search only with the first text box the code works hjust fine but if i make the search w.r. with the second control (combo box cmbStadiu) the error appears. If anyone can help i will appreciate it. Thank you all!
When exporting a table to excel is there anyway to presever the data structure - ie a text field of length 30 will only take text length 30, Interger would only take integer and date would only take date etc, etc ,etc.
Hi, Trying to get back into Access after a long time, just need some refreshing :) tips.
I have 2 tables, one of the tables stores titles (mr, mrs, etc). I tried using the 'lookup' data type to link the data from the other table. This however stores the field as a number and causes problems on my form as only a number is shown rather that the text.
Hey guys- I have a db where I'm not sure what kind of relationship I need to establish between the tables. I have a db that manages real estate properties and realtor information. Each record can have 3 separate Realtors represented (or, as little as 1 realtor). Each Realtor has their own office, or, might have the same office as the other realtors. So, one record can have anywhere from 1 to 3 Realtors associated with it.
I have a Property Table (holds all the info on the property as well as the Realtor's unique alphnumerica ID Code).
I have a Realtor Table (holds all the contact info for the Realtor, as well as their unique alphanumeric Office Code)
And I have a Realtor Office Table (holds the contact info of the Realtor's Office).
In the Properties table- I have 3 fields for the 3 separate Realtor's ID Codes (like an employee number). Let's call it Agent1Code, Agent2Code, and Agent3Code. There won't always be an Agent2 and Agent 3 in the data- but sometimes there is.
How do I set this up and establish the proper relationships?
I have a field defined with a Yes/No type. When it appears on the form instead of showing up with a Box with a checkmark, it shows up as -1 or 0. Any thoughts as to what could be the problem ?
I'm not really looking for code, just a clue as to what to read up on as I have been beating my head against the wall with this one. I can do it in about three steps but I am trying to do it in one. :confused:
The first table1 is like this: id Field1 Field2 Field3 1 TagNo44 Y Yes 2 TagNo5 C No 3 TagNo127 Q Maybe 4 TagNo4 T Perhaps 5 TagNo88 Z Probably Not 6 TagNo17 P Could be
The second table2 is like this: id Field1 Field2 Field3 1 TagNo44 Outfit6 30 2 TagNo44 Outfit14 70 3 TagNo127 Outfit14 100 4 TagNo4 Outfit3 100 5 TagNo88 Outfit3 50 6 TagNo88 Outfit8 50 7 TagNo5 Outfit7 100 8 TagNo17 Outfit92 100
Output table to be like this id Field1 Field2 4 TagNo4 Outfit3&100 2 TagNo5 Outfit7&100 6 TagNo17 Outfit92&100 1 TagNo44 Outfit14&70&Outfit6&30 5 TagNo88 Outfit3&50&Outfit8&50 3 TagNo127 Outfit14&100
Table1Field1 is in a one to many relationship to table2.field1 All fields are strings.
I have two text boxes - on different forms. I can copy the text from one and paste it into the other one ok. However, if I cut (Ctrl-X) from the first text box the second one is not enabled and I cannot do anything in it. Hope you can help.:confused:
I am persistently getting the "Error Number:13; Type Mismatch" with the code below. Any help is greatly appreciated... BTW, in the SQL string, i will like to have the wildcard as "*" but the VB Editor automatically changes it to " * "... can that be a problem??
Code:
Dim db As DAO.database Dim qdf As DAO.QueryDef Dim sqlsearch As String
Set db = CurrentDb
If Not QueryExists("Q_Paint") Then Set qdf = db.CreateQueryDef("Q_Paint") Else Set qdf = db.QueryDefs("Q_Paint") End If
If I have a table with day numbers (1 - 20) and there is a corresponding score for each day between 1 and 5. Is there a way of working out on what day (1-20) the score has been above 3 for the three previous days. Generally if I get pointed in the right direction I can nut out the code (but not always!)
I have a rich text editor that I want to use to post HTML to an access database field. The average post will probably be four hundred or more characters. What is the best Data Type to use for this. I am looking at going with Memo but I want to be sure.
I need to substitute either random, non-duplicating 9 digit numbers in a field that held ssn's or to have a 9 digit 'autonumber'. The 'number' can actually include alpha characters.
How can format proper display for percentage values. What happens is I chose a field as percent, but if I put in 9 meaning 9 % I get 900% as the value is multiplied by 100, but if I put in 0.09 I get 0%. I just want to put in day 9 and be saved as 9%.
Hello everyone … I am a Access Newbie and I have simple problem. My mind is stack and I can find the solution ….maybe it’s really simple but I don’t have a free time It’s hard.. So the problem is that I make one Database in Access (Really nice and simple program) .It;s about one Insurance company and my tables is
1 Customers 2 Agreements 3 Traffic (about the money)
So the customer is one but he can have a lot of agreements (In this case it’s about cars and I use Card Ids) and in the end I can see about the car-agreement traffic. 1 costumer 1 or more agreements and in the end the agreement traffic My problem is that the agreements are for 6 months and for 1 year …I don know how can I I separate them… I need a switch (with 2 only types) Here is the relations in my Database … if you can help me that I would be nice form me ..Thank you
hello people, i wanted to add a string at the end of a long column of Currency. Is there any to to change only the last field to a string or do i have to change the whole column just for the last field?
Within the past 3 weeks I spotted a post that was based around a diary type form, It is distinctive in the way that the guy had created an image using Photoshop or something similar and used it as a backdrop to the form.
It looked pretty neat.
Problem is I cant find it again and I think its just the type of thing I am currently looking for.
I'm using Access 2002 and need to increase some field sizes, some by increasing the maximum number of characters and others by changing from Text to Memo. When I try to do this I get the message "Microsoft Access cannot change the data type. There isn't enough disk space or memory"
I have two 320GB hard drives and 4GB of RAM and the Access file is a mere 280MB. Can anyone please explain the problem and tell me how to achieve my objective?
I have a DB that was given to me with a SSN field that has the Number Data Type. Therefore, if the SSN has a zero as the first number, it is not coming up. Other than changing data type to Text, is there a property that would keep the initial zero? Thank you for your assistance.