The confusion is because I said "There can only ever be one directory rep per company." E.g. a company can have many reps but they can have only one rep that's listed in the directory (the directory rep).
I realize now it was not clear what I meant by that a 'directory rep'. I used a term we...
@Pat Hartman I'm sorry, I think I'm not explaining this clearly.
I understand a company can have multiple reps, so the relationship between TblCustomers and TblReps are separate tables, with a one-to-many relationship.
However, each company can only list ONE rep in the printed directory...
@The_Doc_Man Ah, I see. I didn't realize you couldn't enforce referential integrity with a one-to-one table. Thank you for the information!
@ebs17 Thank you for the clarification. That's what I'll do then.
Re: Why is once a year necessary?
Sorry, I see the confusion. We physically print a directory once per year (old school, I know) so we only use this data when we pull the info for the print run. For this reason, we *only* care about the person the customer currently wants to have printed in...
I'm working on restructuring an Access database at work, and I'm curious if there's a 'best practice' in this scenario.
In this database, there's a table of customers and a table of reps.
All active customers get listed in our directory with a primary rep. There can only ever be one directory...
I have data like this:
ID
Item
Qty
2
Item 1
2
3
Item 2
1
4
Item 1
1
5
Item 3
5
On a report, I want to return the quantity of the current item. That is, if the current record is Item 1, I want to get 3. The items aren't linked to IDs (e.g. Item 1 doesn't always have an ID of 53)...
@plog : Nope, I still get "Compile error: Method or data member not found".
Regarding the query, yeah that's why I didn't post it in my top line post. Essentially, it filters recurring tasks so that I get 1) any tasks that get done every day, 2) any tasks that recur every [whatever day it is...
I'm almost wondering if this is a scope-related issue but I can't work out what it would be since I've used MsgBox to verify the query is coming in correctly.
A SQL query in the form of a string. The full function is as follows, and it's being run from a module:
Function GetDailies() As String
Dim dayNum As Integer
Dim wkDay, wkNum, mth As String
dayNum = day(Date)
wkDay = Format(Date, "ddd")
mth = Format(Date, "mmm")
Select Case dayNum
Case...
I have a dynamic query which is generated by a function (it updates every day). When my parent report loads, I want it to pull in the subreport using this query.
Currently, I'm using this code:
Private Sub Report_Load()
Dim dailyQ As String
dailyQ = GetDailies()
S_RecurSub.SourceObject =...
I am trying to run a query as a mail merge source. The purpose of this query is to pull up a list of anyone who sponsored an event last year, and to exclude from that list anyone who has already signed up to sponsor the event this year.
Essentially, I'm filtering to people who sponsored the...
I think that it's easier to understand what plog is talking about with an example and some general concepts.
Access is based on the *relationships* between data. For instance, a salesperson may make multiple sales. A dealership may have multiple salespeople, etc. Access makes it easy to keep...
Ah, yeah I can understand that...I'm stuck with this frustrating dinosaur of a computer at work so I've started doing neck stretches whenever I'm sitting and waiting for a really big PDF to be sized down. (Can't do anything else while waiting or it hangs up the PC.)