User Profile

Collapse

Profile Sidebar

Collapse
Cintury
Cintury
Last Activity: Nov 12 '09, 05:11 PM
Joined: May 22 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Cintury
    replied to Calling Function From query error 3061
    Nevermind, I figured out where my formatting was wrong. I'll repost the code below in case anyone else has DLookup trouble.

    Code:
    Public Function totLBS(fdreceipt As String, fcat As String) As Long
    
    
    Dim numLbsContainer As Long
    Dim strCriteria As String
    
    strCriteria = "[FoodDonationsID] =" & "'" & fdreceipt & "'"
    numLbsContainer = DLookup("["
    ...
    See more | Go to post

    Leave a comment:


  • Cintury
    replied to Calling Function From query error 3061
    Ok, I've written up a DLookup function and it seems to be correctly formatted yet it gives me a data type mismatch for the criteria section. Can you let me know if I am giving the correct parameters?
    Code:
    Public Function totLBS(fdreceipt As String, fcat As String) As Long
    
    
    Dim numLbsContainer As Long
    Dim strCriteria As String
    
    strCriteria = "FoodDonationsID =" & fdreceipt
    numLbsContainer
    ...
    See more | Go to post

    Leave a comment:


  • Cintury
    replied to Calling Function From query error 3061
    According to my reading on recordsets, it should take the value of that field and place it in the lbsContainer variable....
    See more | Go to post

    Leave a comment:


  • Cintury
    started a topic Calling Function From query error 3061

    Calling Function From query error 3061

    The problem is I have a function that I've created and stored in a module. I call it as an expression (e.g. total: Function(parame ter)). I'm receiving the error 3061: too few parameters, expected 1. Now the query and database are already open so I'm not entirely sure of any connection strings I may need. I think part of the problem may be that the parameter I am using to call the function is part of the query. I am not sure how to come by this value...
    See more | Go to post

  • Cintury
    replied to Switch Statement dynamic values?
    I tried it yesterday within sql for ms access and inside a vba module. Both gave me zeros as a value, I will try the choose() function and report my results.

    Thanks
    See more | Go to post

    Leave a comment:


  • Cintury
    started a topic Switch Statement dynamic values?

    Switch Statement dynamic values?

    This is my first time utilizing the switch statement and I was wondering if it was possible to return a dynamic value for any conditional expression of the statement. E.g. my values are based data from a table which varies depending on the record the switch is calling against.

    Code:
    Switch([Food_Category_ID] = 0, [tblFoodDonations]![Bakery], [Food_Category_ID] = 1, [tblFoodDonations]![Dairy],
    [Food_Category_ID] = 2, [tblFoodDonations]![Meat],
    ...
    See more | Go to post

  • Cintury
    started a topic Combobox dynamic load based on values in columns

    Combobox dynamic load based on values in columns

    I have 2 tables, 1is a table of receipts with values stored under their proper category column (meat,200) and I have another table which gives an index to the category (3,meat). I am attempting to dynamically load a combobox with only the categories which contain a non-null or >0 value for a receipt number specified in a previous combobox.

    The problem is that I am stuck on how to look up the data in the columns and then load the...
    See more | Go to post

  • Cintury
    replied to Weekday result from access column
    Thank you missinglinq this worked, but now I have a column with the appropriate day and its corresponding number showing on the query. When I uncheck the box for it not to be displayed then the other column asks for an input.

    So my question is: Is there no way for the numerical representation of the day of the week to not be displayed?
    See more | Go to post

    Leave a comment:


  • Cintury
    replied to Weekday result from access column
    Ok right now what I have is a column giving me for example "3," and instead of that column giving me that number I want it to give me the actual day for example "Tuesday." Since I already have the one column giving the appropriate numerical value for the day of the week I wanted to know if there was a way I could use that value as the input for the other function.

    WeekdayName(num ber, [abbreviate], [firstdayofweek])...
    See more | Go to post
    Last edited by Cintury; Oct 24 '08, 10:24 PM. Reason: missing info

    Leave a comment:


  • Cintury
    started a topic Weekday result from access column

    Weekday result from access column

    I have the function that returns a numerical value according to its corresponding weekday in one column in the design view of access and what I do not know how to do is make this be "equal to" the number in the WeekdayName(num ber, [abbreviate], [firstdayofweek]) function.

    My current code without the WeekdayName func:

    Code:
    SELECT Dnt.Date
         , WEEKDAY(Dnt.Date) AS Date_weekday
         , Dnt.FoodDonationsID
    ...
    See more | Go to post

  • Is this something I can readily put in my code or design view under a column?...
    See more | Go to post

    Leave a comment:


  • Ok I found what I need to export to excel, and I also changed the query to include a column for the weekday, but as a numerical value. How do I change it to the respective weekday name? Here is my query with a user input date:

    Code:
    SELECT Dnt.Date, Weekday(Dnt.Date) AS Date_weekday, Dnt.FoodDonationsID, Dnr.[Donor Company], Dnt.Bakery, Dnt.Dairy, Dnt.Meat, Dnt.Fruit, Dnt.Vegetable, Dnt.Prepared, Dnt.Juice, Dnt.[Non-Perishable], Dnt.[Non-Food],
    ...
    See more | Go to post

    Leave a comment:


  • Cintury
    started a topic Place Weekday in Query Field and Export to Excel

    Place Weekday in Query Field and Export to Excel

    Using Access 2003 (Access 2000 file format) on Windows XP

    I have a query that pulls from 2 tables that includes a date as well as other data. What I need is code to put in the SQL view, if this is not possible in the regular design view, to extract a weekday from that date (I still do not know why my boss needs the date and weekday). Other than that I have everything I need in the query.

    I know how to add this to the...
    See more | Go to post

  • Cintury
    started a topic Query Criteria

    Query Criteria

    Hello,

    In my query there are two items I want as the criteria. One is the date, and the other is an ID generated from a table. The problem is the table that generates this ID generates it as text so I can't just say >10000.

    Is there any way this "criteria" field can differentiate between text length?
    For example the IDs that I want to show up in the results have atleast 10 digits, and everything below...
    See more | Go to post

  • Cintury
    replied to Pause not Sleep
    Ok I've got the timer setup and I believe its running. I just need to create a busy (do nothing loop) until the timer hits its designated interval. This is what I have so far. I'm looking to exit the timer once the interval is up and return to the calling method. I just don't know how to compare the time object in the timer. I'm trying to setup a Do Nothing While timer.currentti me < timer.interval loop.

    Code:
    Private Sub StarthttpTimer(ByVal
    ...
    See more | Go to post

    Leave a comment:


  • Cintury
    replied to Pause not Sleep
    Thanks for the help I think your idea just might work but just a few errors. when I try to use timer I get this error:

    'Timer' is ambiguous, imported from the namespaces or types 'System.Threadi ng, System.Windows. Forms'....
    See more | Go to post

    Leave a comment:


  • Cintury
    started a topic Pause not Sleep

    Pause not Sleep

    Hi All,

    I'm developing a mobile app in VB and I was wondering if there was anyway to pause or wait a thread without putting it to sleep. I'm just trying to maintain a wireless network connection while I check internet connectivity for 30 secs but if I put the thread to sleep the connection itself closes. The current method is
    Code:
    _sleepTimeBetweenConnectTries = 900 'milliseconds 
    System.Threading.Thread.Sleep(_sleepTimeBetweenConnectTries)
    ...
    See more | Go to post

  • The Computer that was hosting the transfer website had its IP address changed and that caused the connection not to work. So I simply changed the website url in the app files and its good to go.
    See more | Go to post

    Leave a comment:


  • Web.config continued
    Code:
    <pages>
    				<namespaces>
    					<clear/>
    					<add namespace="System"/>
    					<add namespace="System.Collections"/>
    					<add namespace="System.Collections.Specialized"/>
    					<add namespace="System.Configuration"/>
    					<add namespace="System.Text"/>
    					<add
    ...
    See more | Go to post

    Leave a comment:


  • Web.config file
    Code:
    <?xml version="1.0"?>
    <!-- 
        Note: As an alternative to hand editing this file you can use the 
        web admin tool to configure settings for your application. Use
        the Website->Asp.Net Configuration option in Visual Studio.
        A full list of settings and comments can be found in 
        machine.config.comments usually located in 
        \Windows\Microsoft.Net\Framework\v2.x\Config
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...