Search results

  1. S

    Setting a Value in a Field based on Selection in Combo Box

    Hello, I have a value in a table called WeekendAdmit. It is a Yes/No datatype. If the user selects from the combo box any UnavailableReason I want the Weekend Admit field to be updated to Yes. Originally this was done in a macro, but I wanted to learn how to do it in VB. I get an error...
  2. S

    Calculate a Median Access 2010 Query

    Yes I'm sorry I thought I said that above. I realized it did not. Yes works perfectly. Thank you :)
  3. S

    Calculate a Median Access 2010 Query

    I changed the data types from single to Long and that solved the overflow problem. Function MedianF(pQuery As String, pfield As String) As Long Dim rs As Recordset Dim strSQL As String Dim n As Long Dim sglHold As Long strSQL = "SELECT " & pfield & " from " & pQuery & "...
  4. S

    Calculate a Median Access 2010 Query

    I am not sure how to create a access 2003 version. I tried to create a new db and I was just going to copy the tables, query, and function over, but I don't even see an option to save as or create as a lower version.
  5. S

    Calculate a Median Access 2010 Query

    Thank you for pointing me to that link. I didn't see it when I did a search. I have it working now, but is there a limit to the number of rows that can go through this function? There was 119000 rows returned by the query and I get an overflow error. If I limit my date range it works fine...
  6. S

    Calculate a Median Access 2010 Query

    Is there a way to calculate a median in an access 2010 query? I can't seem to find an example.
  7. S

    Non Updateable Form Trouble

    It is a single form. I didn't know about DLookup. I will look up how to use that function. Thank you!
  8. S

    Non Updateable Form Trouble

    That is what I was thinking about doing, I just didn't want to give the user the perspective that they could or should change the value. I could just lock the field. If there is any other way I would like to learn that too. Thank you.
  9. S

    Non Updateable Form Trouble

    Hello, I have a form that is driven from a query. The query just had one table and two of the fields were facility id and unit id stored as numbers with the actual descriptive value stored in a lookup table. My first thought was to link the Unit and Facility table in the query that was...
  10. S

    Date Part Year and Month

    Perfect. :)
  11. S

    Date Part Year and Month

    Here is my field: YrMo: Year([DischargeDateTime]) & Format(Month([DischargeDateTime]),"mm") The weird thing is that in the DischargeDateTime field I have dates like 7/12/2012 15:20 etc, but the YrMo retuns 201201. Is this because of the month not having the leading 0? Is there any way...
  12. S

    Date Part Year and Month

    Is there a way to extract the year and month only from a date field and create a new field? I have tried DatePart("yyyymm", [DischDate]) and multiple little versions of that and I can't seem to get anything to work. I tried to do the year and month separately and then concatentate them...
  13. S

    Conditional Formatting More Than 3

    I have 5 different possibilities and I wont to change the color the header depending on what the different facility names are. I have tried multiple examples in the group header format event, but it always says it can't find the field named facility although that is what the field is called and...
  14. S

    Using Returned Results from a SQL Vba Query

    Thanks for the response. I will save that for future reference. I ended up just finding this other example that worked. I will post it here so if anyone else might find it helpful: Dim strCriteria as string strCriteria = "[PC Name] = '" & me.cboComputerName & "'" me.txtComputerIDCode =...
  15. S

    Using Returned Results from a SQL Vba Query

    Hello, I have this query that I am using to find an ID number. I want to use the ID that the query returns and assign it to a text box on my form. I can't figure out how to do it and can't seem to find anything that gives an example. Dim strSQL As String strSQL = "Select ID FROM...
  16. S

    Incomplete Query Clause

    I think I got it figured out now. Here is what I did in case anyone wants to use it for help. Dim strSQL As String strSQL = "Select ID FROM [Computer Inventory] " _ & "WHERE [PC Name] = '" & Me.cboComputerName & "'" I guess its bad practice to put spaces in column names so I put...
  17. S

    Incomplete Query Clause

    Hello, I am trying to return a value from a table based on the value that a user selects from a combo box. I am trying to get my SQL statement to work and I keep getting an error that says Incomplete Query Clause. I have tried all kinds of options I found online but I can't seem to get it...
Back
Top Bottom