Search results

  1. M

    Building query with one to many relation

    Hi all, I need some help building a query that I need, but I can't get it to work. I have a customers table and a customers contact details table. Its a one to many relation. CustomerID - FK MediaTypeID - FK (its phone or email) LabelID - FK (its a label, like invoice address or mobile...
  2. M

    Retrieve multiple recordcounts

    Hello all, I am in the process of migrating an Access database to a SQL Server backend. I'm pretty new to SQL Server so I'm learning along the way. I need to populate a dashboard with multiple recordcounts from the same table, so I'm looking for an efficient way of doing this. Let's say I...
  3. M

    Retrieve value based on time of day

    Hi all, I need to classify events based on weekday and hour of day. I plan on creating a table that holds: CustID - WeekdayID (0 to 6) - HourID (0-23) - ClassificationValue So I cycle through all the events from Customer X, retrieve weekday number from the event date and the Hour from the...
  4. M

    Advice on proper normalization

    Hi all, I need to store details from objects. I will store many different objects, potentially up to 1 mil. Each object has 30 to 40 properties and each property has a value. So I created 1 objects table so that each object gets an ID. Then I created 1 properties table that contains an ID...
  5. M

    Control form image from VBA Module

    Hi all, I need some help. On my form I have an unbound image object. I want to set the image source and image tooltip text from an external procedure (module in the same DB). It's basically a validation sub. The user enters some details, for example an e-mail address. Then I run the validation...
  6. M

    Proper structure for keeping track of hours

    Hi all, I'm building a database to keep track of holiday hours and absent hours of my personnel. Before building all forms and reports I want to set up the data structure properly. I currently have 1 table that stores everything. EmployeeID, HourTypeID, NrOfHours. The problem is that with...
  7. M

    Open Recordset based on Parameter query with OR operator

    Hi all, I am having issues with opening a recordset based on a query that requires two parameters. My query has a parameter [Year] and a parameter [Partlist] The partlist should be a string of Article codes seperated by the Or parameter. The first parameter (Year) works fine, but when I add...
  8. M

    German VAT Number validation

    Hi guys, I have a need to validate German VAT numbers using the check digit formula. The German VAT number starts with DE followed by 8 digits and 1 check digit. There is a formula that you can use the calculate the check digit and with that validate if the number is correct. The formula is...
  9. M

    Function to get the sum of a listbox column

    I am trying to create a dynamic function that will calculate the sum of a column of a listbox. When calling the function I would like to specify the form, the listbox and the column. Somehow the form name and listbox name are not coming through. Do you have any suggestions? Function...
  10. M

    Functions in new module

    Hi all, Today my precious database got corrupted and I think the reason was that I put several functions in the same module. I often read with functions that people post, paste the following code in a new module... Are there any known issues putting several functions in the same module? Is...
  11. M

    Escape " sign in UDF parameter

    Hi guys, I am creating a function to convert a position from DMS (Degree, Minute, Second) format to DD (Decimal Degree) format. I couldn't find anything good on the web, so I'm now making my own version. The function below is working fine, except for the fact that the DMS parameter normally...
  12. M

    Dcount with Date criteria

    Hi all, I can't get this sorted. I have created a report where I want to display the total number of records that were created today. So I have set the following control source for my textbox. =DCount("[EditRecordID]";"tblActionLog";"Format([EditDate];'mm\/dd\/yyyy') =...
  13. M

    User Defined Function with predefined parameters

    Hi all, I'm trying to create a custom function to return vehicle information, using an webservice. When calling the function, I want to provide 2 parameters: 1 for the vehicle plate number and 1 for the dataset type. The online service provides different datasets for different kind of vehicle...
  14. M

    XML Processing for function

    Hi all, I'm trying to create a function that converts a zipcode with house number to an address. I found a web service that does this, but I don't get the function to work. I don't understand how to parse the XML result. My current code (which returns nothing) is: Function findAddress() As...
  15. M

    Generate random and unique number

    Hi all, I'm having problem generating an unique customer number. It should always have 7 digits and the 'SSE' prefix (for example 'SSE1234567') Can you see what's wrong? 'Generate customer number for SSE customers. Dim Result Dim strCustNr As String strCustNr = "SSE" & Int((9999999 -...
  16. M

    Generate rich (HTML) e-mail message using VBA

    Hello all, I currently use an Access database to store my customer details. In this database I created forms to search, select and view the customer details. On the form, I created the option to generate and e-mail message, to this particular customer. This is working fine, except for the fact...
  17. M

    Query based on day range without year

    Hello all, I have a customers table, that includes a "Contract begin date". I want to calculate how many contracts have been renewed within the last 45 days. So today is the 27th of July. I want to return all customers that have a contract begin date between 12-06 and 27-07 regardless of the...
Top Bottom