Don't Understand The Logic

Jan 28, 2006

I created a db, tested it with dummy info and all was fine. I then imported live data from another db. When I came to add new records, discovered that, in the table design, a default value of 0 (zero) has been entered for fields where a look up table is used (where I had used Autonumber for the ID). Solved that easily enough, but later I amended a text box to a combo box and the same thing happened. Why does it do this?

View Replies


ADVERTISEMENT

Please Help Me Understand This.

Oct 25, 2007

I have always had trouble with this and no matter how much I read I cannot get a visual picture of how to do this.So if any of you could show me how this can be done. It would be appreciated more than you can ever know.A company has many employees.Each employee can have many certificates.So how do I set up the tables and the RELATIONSHIPS(this is the part I can't understand), so when I create a form and enter the different types of certificates they all go to the right table?This is what I have so far.Employee TABLEEmployeeID(PK)EmployeeFirstNameEmployeeLastNameEmployessAddressEmployeeCertificateOneEmployeeCertificateTwoEmployeeCertificateThreeEmployeeCertificateFouretc....toEmployeeCertificateEightCertificate TABLECertificateID(PK)CertificateNameCould someone explain in detail how I can do this?I really would like to understand this.I'm sure it is simple but for some reason I just can't get a visual picture in my head on how to do it.I'm a visual learner, I have to see it work and then read how it works to fully understand how something works.Thanks in advance.P.S. I forgot to mention that I need DATE fields for the Employee Certificates because they expire after a certain time.I was not sure where to put those.

View 14 Replies View Related

Need To Understand Why?

Oct 13, 2004

Hi,

I designed a form to provide options for a group of reports. Each option when clicked, runs a specific report. On my machine when I created and ran the form, worked very well. This database is on a shared network drive with few other people having access to it. When these other users opened this form (they don't have problems running ANY other form), they got errors such as "Undefined Format function in the expression". I checked on their machines, the Access version and permissions of the database (I haven't set any special permissions on this database at all). It is same as mine. Please help me. Why is this happening and what should be done to avoid it? The database opens in a default shared mode.

Thank you.

View 4 Replies View Related

Help!! I Don't Understand ANYTHING

May 14, 2005

I'm really sorry to bother with my stupid questions, but I'm definitely not a programmer, and after reading about Access, SQL and ASP so much, I feel really confused...

I've already explained what I want to do in the SQL server forum.
It's for an experimental project, I need a database that keeps only 100 records, and every new entry of data replaces the oldest record. So in the end there are always only 100 records.

Well, Lauramc nicely gave me this code that should do that:Code:CreateTrigger YourTable_Trigger1On YourTableAFTER INSERTAS DECLARE @OldestID intSET @OldestID = (SELECT MIN(YourTable.ID) FROM YourTable)--Table name is YourTable, with a primary key of ID.IF (SELECT COUNT(YourTable.ID) FROM YourTable) = 101 --You can also use @@RowCount to get the number of rows.BEGIN DELETE FROM YourTable WHERE YourTable.[ID] = @OldestIDEND

But all I know is how to do is put some simple SELECT statements in an ASP page to call a csv database.

I've realised that I might need to use Access but I don't understand anything.

- Should I use Access and if yes, where am I supposed to copy this code? Should I bring any modification to it?

- Apparently it's possible to create a database from SQL, does it mean not using Access? Where should I type the code? In what sort of file?

Please please, can someone tell me it's actually very simple?

View 5 Replies View Related

Anybody Understand Winfax DDE Pls?

Dec 30, 2005

I am now right at the last fence in what has been an "interesting" assignment! Sending an attachemnt from Access through winfax!

I have found the following excellent code but, the problem is that the documemnt appears in a "preview" kind of pane, I just want it to go ahead and send! Everything else works fine

Any sugestions pls?

Many Thanks
Andy

Public Function SendFax()

'On Error GoTo ErrorHandler

Dim strRecipient As String
Dim strFax As String
Dim strattach As String

'Test for required fields
strFax = Forms!frmFinanceProposal!Text1077
If strFax = "" Then
MsgBox "Please enter a fax number"
GoTo ErrorHandlerExit
End If

Debug.Print "Fax: " & strFax

strattach = "C:InboundFaxesFax.snp"
Debug.Print "Attachment: " & strattach

'Start DDE connection to WinFax.
'Create the link and disable automatic reception in WinFax
lngChannel = DDEInitiate(Application:="FAXMNG32", topic:="CONTROL")
DDEExecute ChanNum:=lngChannel, Command:="GoIdle"
DDETerminate ChanNum:=lngChannel

'Create a new link with the TRANSMIT topic.
lngChannel = DDEInitiate("FAXMNG32", "TRANSMIT")

'Start DDEPokes to control WinFax.
strRecipient = "recipient(" & Chr$(34) & strFax & Chr$(34) & ")"
Debug.Print "Recipient string: " & strRecipient
Debug.Print "Length of recipient string: " & Len(strRecipient)
DDEPoke ChanNum:=lngChannel, Item:="sendfax", Data:=strRecipient

'Specify attach
DDEPoke ChanNum:=lngChannel, Item:="sendfax", _
Data:="attach(" & Chr$(34) _
& strattach & Chr$(34) & ")"

'Show send screen
DDEPoke ChanNum:=lngChannel, Item:="sendfax", _
Data:="showsendscreen(" & Chr$(34) _
& "0" & Chr$(34) & ")"

'Set resolution
DDEPoke ChanNum:=lngChannel, Item:="sendfax", _
Data:="resolution(" & Chr$(34) _
& "LOW" & Chr$(34) & ")"


'Send the fax - heres where it falls over

DDEPoke ChanNum:=lngChannel, Item:="sendfax", Data:="SendfaxUI"
DDETerminate ChanNum:=lngChannel
lngChannel = DDEInitiate(Application:="FAXMNG32", topic:="CONTROL")
DDEExecute ChanNum:=lngChannel, Command:="GoActive"
DDETerminate ChanNum:=lngChannel

lngChannel = DDEInitiate(Application:="FAXMNG32", topic:="CONTROL")
DDEExecute ChanNum:=lngChannel, Command:="GoActive"
DDETerminate ChanNum:=lngChannel


'*************NEED A COMMAND HERE TO GO AHEAD AND PERFORM THE SEND!

ErrorHandlerExit:
'DoCmd.Close objecttype:=acForm, objectname:=Me.Name
Exit Function

ErrorHandler:
MsgBox "Error No: " & Err.Number & "; Description: " & _
Err.Description
Resume ErrorHandlerExit

End Function

View 2 Replies View Related

Need Help Trying To Understand Options

Jan 18, 2006

ok I have an access db which is all on access. the dbase has been operational now for 3 years and working well however, do to business needs and changes I'm trying to figure out a better way to collect and share data.
So the backend of the database is stored on our local office server when users log on to enter or review data they must be in the local office. We now had the need to access the database remotely from customer sites. Now the way this works is we use a local dialer to connect to our company's network and then are routed to our local server (you can imagine how slow this is) it is impossible to operate the current database this way. So I have been reading different posts and different options (front page, sql, asp etc.) What
I would like to do is convert my dbase to a program which can allow input and review of data both remotely and locally without a huge speed loss. What is the best approch for me?

thanks

jon

View 2 Replies View Related

Help Me Understand This Code

Jan 25, 2006

Dim rstComment As Recordset
Dim strCriteria As String

Set rstComment = CurrentDb.OpenRecordset(Me.OpenArgs)
strCriteria = strItem & " = " & nNumber & " AND ProgressionID = " & cboProgressionID

With rstComment
.AddNew
![CommentNo] = DCount("CommentNo", Me.OpenArgs, strCriteria)
.Fields(strItem) = nNumber
![ProgressionID] = Me![cboProgressionID]
![Comment] = Me![txtComment]
![PersID] = 0 'Will be changed by SQL Server
![Date] = Now() 'Will be changed by SQL Server
.Update
.Close
End With

This code is used in a form that is accessed via a main form when a progression is selected. The form that opens allows the user to selct a type of progression and to enter a comment. This data is then transferred to a table.

I get an error:

Error No:3184 Couldn't execute query; couldn't find linked table.

This form is used elsewhere in the database and works fine. The code is exactly the same. The form name is different and the table it points to is the same design of table as the other but obviously named differently. i am confident it is referenced correctly. But you lot are the experts.

I am not trained in VBA and have only just started to understand bits of it.


Cheers All

View 4 Replies View Related

HElp Guys, I Can't Understand The Error

Mar 18, 2007

Private Sub cmdSearch_Click()
Dim LSQL As String
Dim LSearchString As String

If Len(txtSearchString) = 0 Or IsNull(txtSearchString) = True Then
MsgBox "You must enter a search string."

Else

LSearchString = txtSearchString

'Filter results based on search string
LSQL = "select * from MCS_All_Services_v8"
LSQL = LSQL & " where Country LIKE '*" & LSearchString & "*'"

Form_MCS_All_Services_v8_subform.RecordSource = LSQL

lblTitle.Caption = "Customer Details: Filtered by '" & LSearchString & "'"

'Clear search string
txtSearchString = ""

MsgBox "Results have been filtered. All Company Names containing " & LSearchString & "."

End If




it kept mention that is Identifier Under Cursor Not Recognized? on the line "FORM_MCS_All_Services_v8_subform. RecordSource....

ideas people?

View 1 Replies View Related

Baffled: Gosh! I Hope Someone Will Understand And Be Able To Help Me!

Nov 28, 2007

Action:
1) Update the blank fields in a table + add newly imported records but...make sure that there are no duplicates.
I need to Append the records from a table called: XLS_Imp_11_27_07 to my main Table " Invoice Tracking for A/P 10_30".
The fields found in the XLS _ table: Release Dt, Entry Dt, Liquidation Dt may have been populated by a live report found on Internet. Since it's a live report, when Appended, to the other table, it will create numerous duplicates.
The fields found after the 7 first fields in the Invoice Tracking Table may have been updated by users

Is there a way to avoid duplicates and get the data from one table to the other without wiping out whatever is already filled-in?
:(

View 8 Replies View Related

Help-dont Understand Dlookup In This Situation

Jan 17, 2007

Hi i'm after some time saving advice

i'm writing an Access database to quote for windows & doors,
there are many variants like style, width, height, glass types, security specifications and about 4 other options.

what would be the best way of working out how to add the extras for each option,

The price would be based on the style first, then depending on width and height, then on what options were ticked . i.e securtity spec yes/no, then on what glass type, the price gfor that would be based on the entered width x height etc.

is it possible to do a look up, like you can in Excel where it looks at at grid/matrix based on style number and width x height to get the price, but then how would i get it to add the other options which will depend on size and number of openings.

any help greatfully received.....

View 1 Replies View Related

Help On Sql And Logic

Jun 14, 2006

Have this table

ID | NAME | Progresscomplete | Release
1 | a | 20% | July
2 | b | 65% | July
3 | c | 33% | July
4 | h | 15% | Sept
5 | i | 30% | Sept
6 | r | 5% | Dec
7 | s | 50% | Dec
8 | t | 15% | Dec
9 | u | 20% | Dec

now I want to create a query that shows the Progresscomplete for each task as a percentage for a Release

so the total progress for each release is
July 300%
Sept 200%
Dec 400%

and the current level of progress for each release is
July 39.33% (118/300*100)
Sept 22.5 % (45/200*100)
Dec 22.5 % (90/400*100)

thus the current level of progress for each task within a release is
1 | a | 16.9% (20/118*100) | July
2 | b | 55% (65/118*100) | July
3 | c | 28% (33/118*100) | July
4 | h | 33% (15/45*100) | Sept
5 | i | 66% (30/45*100) | Sept
6 | r | 5% (5/90*100) | Dec
7 | s | 55% (50/90*100) | Dec
8 | t | 16.6% (15/90*100) | Dec
9 | u | 22% (20/90*100) | Dec

I have queries for the first two not sure about the last also
not sure if i should have the base of the last output be the current level of progress for each release or the total progress for each release

I have tried this for the last output

SELECT ID, NAME, ((Progresscomplete/Count(Progresscomplete))*100) AS currentprogresslevel, Release
FROM TEST_RawData
GROUP BY Release;

but get an error "tried to execute a query that does not include specified expression... as part of an aggregate function.

View 5 Replies View Related

Help A Newbie Understand Simple Math Functions

Aug 6, 2006

I am completely new to Access but probably all I will need is a gentle push in the right direction. I'd like to think I'm fairly quick at learning new things. Thank you in advance, here's where I am, (first step anyway):

Table 01 Parts List
ID - name - cost

Table 02 Item List
ID - nick name - description

Table 03 Items to parts relationship (this is where I fall apart)
ID - Item ID (relationship to table 02) - Item nickname - PartID (relationship to Table 01) - Part name - Part quantity.

What I am trying to do:
I resell items in table 02 which are built of various parts from table 01. I need to generate a table that says:
Item 1 is built from 4 of part 1, 2 of part 2, 9 of part 3, and the total cost of parts for Item 1 is x. I want to update the parts list cost on a regular basis and have the item price change reflected.

If I can understand how to make this work, I can ultimately add in labor and overhead etc etc. Baby steps for now.

Thanks again
-Richard

PS
Here's a copy of my sad little db

http://www.biggsandsmith.com/temp/Trial-db2.mdb

View 4 Replies View Related

Sum Logic For Report

Dec 19, 2005

I have a report that takes money values form several records and sums them up in various category's making a list of departments with the total amount of balance for each (positive and negative numbers). I need to categorize the positive values form the negative and calculate the totals of each and the grand final total (invoice style)

View 1 Replies View Related

Please Help With Query Logic

Oct 18, 2006

Access is making my brain hurt - can anybody please help?

Here's what I have and what I am trying to get it to do...

I have a table, maba_registrations, into which students are entered according to which course they are doing in which semester - eg -


autonumber student_id course_code semester year
1 1 A123 1 2006
2 2 A124 1 2006
3 2 A124 2 2006
4 2 A126 1 2006
5 3 A132 1 2006


What I need to do is to pull four subsets of data out of this table -

1) A unique list of courses that student x is taking in semester 1 (only) of a given year
2) A unique list of courses that student x is taking in semester 2 (only) of a given year
3) A unique list of courses that student x is taking over 2 semesters (both semester 1 and semester 2 of a given year)
4) A unique list of courses that student x is taking over 2 semesters (semester 2 of a given year and semester 1 of the following year)

Obviously there should be no overlap... and that's where I get a bit stuck

I can craft a simple query that will show me the courses a student is taking in semester 1 of a given year, but I cannot figure out how to get it to exclude those courses which are also still being taken in semester 2. In the above example, the query pulls out records 2 and 4 for student 2; I only want record 4.

I think what I need is to have 2 queries -

a) pulls out all courses for student x in semester 1 for the current year
b) pulls out all courses for student x in semester 2 for the current year

- and then subtract the results of query (b) from query (a) (ie remove the rows that are matched). Is there any way to do something like that?

Or is there a simple part of query syntax that I can use to make a query that just says "pull out all the courses for student x where semester=1 and there is no row for this course and this student where semester=2"?

Any ideas would be hugely appreciated!

View 4 Replies View Related

Logic On Percent Format????

Dec 8, 2005

Maybe someone knows the logic behind MS Access for the display of percents in the formating..... ie.... If you input 3 you get 300.00%. I really dont think ANY user would look at a form... with a field called...say "Commission percent" and expect an input of a 5 to return 500.00% Does this need to be corrected with coding?

View 2 Replies View Related

Date Query Logic Help

May 4, 2007

Hey guys, I'm a little lost in my logic here for some reason.

I have a table that has 6 dates. I'll label them as 1 to 6.
Date 1 > Date 2 > Date 3 > Date 4 > Date 5 > Date 6.

I would like to run a query to ensure that this holds true. Can anyone give me a little help on this?

Do I have to do an individual compare from 1 field to the 5 other fields 6 times? for example

Select if
Date 1 < Date 2
OR
Date 1 < Date 3
OR
Date 1 < Date 4
etc etc.?

View 5 Replies View Related

Faulty Query Logic?

Apr 4, 2008

I realize my newbness shows here...

Im trying to run a query that looks in a table to see if product a and product b were purchased and then return the id but i never get any data, and I know there are some results that should be showing up. If I remove either one of the products it returns data but not when both are requested. here's the query:
SELECT [Copy Of data].id, data.purchase_product, data.purchase_product
FROM data INNER JOIN [Copy Of data] ON data.email = [Copy Of data].email
WHERE (((data.purchase_product)="ProdA") AND ((data.purchase_product)="ProdB"));

what am i not getting?

View 5 Replies View Related

Creating A New ID Field With Logic

Apr 24, 2008

I am looking for some direction on how to approach this.

I have a table that has a field call DocumentID and I don't like it. I would like to create my own.

In the same table I also have 10 fields of data called L1, L2, to L10.

I would like my new DocumentID to be the 10 fields concatenated together, with a period between them unless the value of the field is null.

If this is a query I need to then move the data back to a table in the same database.

Any suggestions on a good strategy/approach?

Thanks

View 3 Replies View Related

Logic Commands: IF Function

Feb 26, 2007

I have been working on customizing MS ACCESS to
produce a report that involves one mathematical
computation from my input data. However, I've run
into a problem because I can't get the program to
carry out a logic command that would work fine in
MS Excel: the "IF" command. Specifically, what I'm
doing involves a calculation, where one data input is
subtracted from another data input, but if the difference
is a negative number, I would like to substitute the value
of ZERO. The closest I've come to achieving this is to
enter the condition ">0" while in Query Design mode, but
the problem with this approach is that if the difference
is a negative number, the report does not display the
data that resulted in the calculation of the negative number.
In other words, I want the data to be included in the report,
but I want a "Zero" to be substituted for all calculations that
produce a negative number. For example, if I enter a set of
data, and the two numbers that get subtracted are 40 minus
36, then the difference is positive 4, and so I want a "4" to
be displayed; But if the two numbers to be subtracted are
36 minus 40, the result is negative, and so I'd want the
report to display a "zero" in the calculation.
Please advise me on how to set this up, as the only approach
I've found resulted in all negative calculations being omitted
from the report.
Thanks for your help.

View 6 Replies View Related

Can Someone Please Explain Basic Query Logic To Me?

May 11, 2006

I am not sure if I understand this...

I have MainTable, on which I base MainForm. I would like to have MainForm show only the records that have a null value in CertainField. If I write NullQuery to select only those records, can I redirect MainForm to NullQuery? Well, I know I can do that... but how does MainTable get updated with new records if MainForm is based on NullQuery????

Any help is greatly appreciated.

Tom

View 4 Replies View Related

Logic Testing For Incremental Numbers

Jan 7, 2005

I need some help with code. I can do this in Excel, but I am not sure how to do it in Access.

Here are the fields:

PoundsPerBox
PoundsPerOrder
BoxesToOrder

Here is the scenario: If a customer orders custom paint for their equipment, we need to total how many pounds of Powder Coat paint it takes to paint all the units (PoundsPerOrder). When we order this from the vendor we have to order it by the box which is measured in pounds. In this example, the vendor will sell us a box of white Poweder Coat paint in increments of 55 pounds. (55, 110, 165,...)

Verbally, the logic reads like this: If PoundsPerOrder is less than or equal to PoundsPerBox, then BoxesToOrder equals 1. This logic needs to be tested for each increment value (indefinately) of PoundsPerBox.

Am I making sense? How do I accomplish this in Access? And, as a side note, I need to capture and store this value in a table for future reference.

View 7 Replies View Related

Reports :: Subreport Based On Logic

Oct 21, 2013

I would like to create a report based on a query. The first part is simple enough. However within this query I have a 'Count field' (a total of the number of duplicated this record has appeared in the table). And would like to create a subreport (if possible) based on that value for example. if count > 1 then show subreport.

My question therefore; is the above possible? How would I go about linking this logic with the subreport

View 1 Replies View Related

What Is The Logic On How Report Fields Are Exported To Excel

Nov 13, 2007

Tried to export a report to Excel using Tools>Office Links>Analyze It With Microsoft Excel menu. The order of the fields appearing in Excel doesn't seem to match the order on the Access report layout. What is the logic on how the fields exported? Thanks.

View 1 Replies View Related

How To Design/Link Tables - Logic Braindead

Jan 9, 2006

Ok, here it goes:

Got these tables:

CompanyTbl:
CompanyID (PK)
Name
Street
etc.
NAICS1(this is a standard industrial code, a 6 digit number telling about their product/service)
NAICS2
NAICS...6 (company can have 1-6 NAICS codes)

A layman has no clue what these NAICS code are, so each and one of them has a descriptive title, like NAICS 32330 = Canned Vegetables Manufacturing
For this puropse, I designed a second table:

ProductTbl
ProductTitle (PK)
NAICScode

Purpose:1. Be able to query by ProductTitle and get all companies with that profile.
2. Be able to retrieve Company ID with all its NAICS code/s and corresponding ProductTitle/s.
Now one company can have up to 6 NAICS codes and one NAICS code can appear under the descirption of multiple companies. So a many-to-many relationship. But how? A third table, probably....But how?

View 12 Replies View Related

Modules & VBA :: Failure Of Logic Due To Quotation Marks?

Jun 17, 2014

In the highlighted line of code attached I am comparing two strings one from a snapshot recordset and one from an array.

The logic fails, you can see in the watches window both values equal "DESIGN and the elseif statement should execute but it does not.

The only reason I can see for this is that the values are equal to "DESIGN and not DESIGN. Where this single quotation mark comes from I do not know. It is not visible in the tables and it does not appear when the values are printed into excel.

View 5 Replies View Related

MS Access: Logic For Point/Miles Rewards Program

Jul 9, 2007

Hi Everyone:

I am new to this forum as I recently started working in MS Access. I’m hoping someone can please help me with this query I’m trying to do using MS Access 2007.

This task is somewhat similar to a typical points/miles rewards credit card program.

The problem is as follow:

For every $2,000 of accrued purchases in a credit card, an individual will get a gift card.

So, any remaining balances over $2,000 will rollover and be added to next set of transactions, until it reaches $2,000 again. For instance, if on the first week I spent $2,500, I would qualify for my first gift card. The excess $500 would rollover and be added to the next set of transactions until they reach $2,000 again. Therefore, this would qualify me for another gift card.

So far, I’ve created two tables, one that stores accrued purchases (Promo History) and another table based on an Append Query which takes all qualified transactions from the first table and appends those records to the second table (Promo History Qualified) in order to track those qualified transactions over $2,000.

However, I’m stuck on how I would accommodate the remaining balances to be carried over. Any suggestions would be greatly appreciated!!

Thank you in advance,

marel

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved