Search results

  1. S

    Creating custom views (column orders) in subforms with datasheet view

    Yep. That was a typo, but the real issue was using the # in the naming convention. I changed that and now the code works. Thanks.
  2. S

    Creating custom views (column orders) in subforms with datasheet view

    I was thinking something like this, referring to the Column Order property of the control on a subform: Private Sub Command88_Click() Me.[SGS Data Review sfrm].Form!Water.ColumnOrder = 1 Me.[SGS Data Review sfrm].Form!Date.ColumnOrder = 2 Me.[SGS Data Review sfrm].Form!Form.Survey#.ColumnOrder...
  3. S

    Creating custom views (column orders) in subforms with datasheet view

    I have a subform in datasheet view whose column order I would like to be be able to customize, perhaps with a button on the main form. Since there are different usages of the data based on the task users may be engaged in, it would be very helpful for them to have a way to order the columns...
  4. S

    Carry forward incremental values in datasheet form entry

    I am hoping to save my data entry staff a lot of time entering long ID numbers for genetic samples in our database. I have been able to carry forward values in forms in datasheet view, but I'm having trouble figuring out how to carry forward a sequential alpha numeric code with an incremental...
  5. S

    Unpivoting data in Access

    Solved: Select [Snow Smolt Annual].Year, [Snow Smolt Annual].SumOfSS As [Total], "SS" as [Class], 1 as [Order] From [Snow Smolt Annual]; Union All Select [Snow Smolt Annual].Year, [Snow Smolt Annual].SumOfSM As [Total], "SM" as [Class], 2 as [Order] From [Snow Smolt Annual]; Union All Select...
  6. S

    Unpivoting data in Access

    I inherited a Database with a Table that stores information in fields: Date SS SM SL which I summarize in a Query with totals as Year SumOfSS SumOfSM SumOfSL What I would like to do is essentially unPivot this data: Year Class Total 2012...
  7. S

    Crosstab query criteria from subform control

    Thanks. Sounded like a great workaround, but it is still producing the same error on the Crosstab. TRANSFORM Count([CHIN Sample Data].Species) AS CountOfSpecies SELECT [CHIN Sample Data].Species, [CHIN Sample Data].Water, [CHIN Sample Data].Section, [CHIN Sample Data].Date, [CHIN Sample...
  8. S

    Crosstab query criteria from subform control

    Hi, I am trying to run a crosstab query with criteria based on a subform control: TRANSFORM Count([CHIN Sample Data].Species) AS CountOfSpecies SELECT [CHIN Sample Data].Species, [CHIN Sample Data].Water, [CHIN Sample Data].Section, [CHIN Sample Data].Date, [CHIN Sample Data].Mark, [CHIN Sample...
  9. S

    Conditional expression in Query

    By storing the conversion factor in the table with water attributes and adding that to the query I was able to produce the desired result. I thought it could be done on the fly, but this method works. Thanks.
  10. S

    Conditional expression in Query

    The Redds field is a calculated field from one table, which is summed then multiplied in an expression to get Esc (see shapsot). It works fine as pictured, but when I introduce the conditions, which do come from one of the other related tables, it does not work. The db is pretty big. Here is...
  11. S

    Conditional expression in Query

    Yes, I did try that originally: Esc:IIf([STHD DIP]=”Skokomish” OR [STHD DIP]=”West Hood Canal”, Round([Redds]*0.7175*2,0), Round([Redds]*0.81*2,0)) But also got an invalid syntax error. That's why I tried nesting my IIf statements. None of my statements have returned any results. Each time...
  12. S

    Conditional expression in Query

    Yes, It's an aggregate function drawn from three related tables. The calculation works without conditional statements. I uploaded a screenshot of the query in case that helps illustrate the structure and issue. Thanks very much.
  13. S

    Conditional expression in Query

    I am trying to use criteria to create a conditional expression in an Access Query. IIf([STHD DIP]=”Skokomish”, Round([Redds]*0.7175*2,0), IIf([STHD DIP]=”West Hood Canal”, Round([Redds]*0.7175*2,0), Round([Redds]*0.81*2,0))) I have a nested IIf expression to evaluate a field where two...
  14. S

    Filtering records by date

    I found an example of dates being passed this way: If Nz(Me.DateFilter, 0) > 0 Then 'TargetType If Len(Nz(strFilter)) > 0 Then strFilter = strFilter & " And " strFilter = strFilter & "[Date (mm/dd/yyyy)] = #" & Me.DateFilter & "#" bFilter = True End If And indeed, answered my...
  15. S

    Filtering records by date

    I am trying to allow users to filter a set of records by date. My reference to the filter control is as follows: If Nz(Me.DateFilter, 0) > 0 Then 'TargetType If Len(Nz(strFilter)) > 0 Then strFilter = strFilter & " And " strFilter = strFilter & "#Date# = '" & Me.DateFilter & "'"...
  16. S

    Auto filling fields in based on values in a form

    Thank you very much for the suggestion. But for some reason the same error is occurring: Private Sub Section_AfterUpdate() Me.RMLower = Me.Section.Column(3) Me.RMUpper = Me.Section.Column(4) End Sub at .Section (this is the name of the control.
  17. S

    Auto filling fields in based on values in a form

    Auto filling fields based on values in a form This is one of those rare occasions where values from a related table must be stored in the main table; These are river mile start and end points that are default values but not always actual values. The purpose of this action is to bypass...
  18. S

    Incremental increase of Date field in form

    This did the trick: Private Sub Form_AfterUpdate() Dim ctl As Control For Each ctl In Me.Controls If ctl.Tag = "CarryForward" Then ctl.DefaultValue = """" & ctl.Value & """" End If If ctl.Tag = "Advance" Then ctl.DefaultValue = """" & ctl.Value + 1 & """" End If Next ctl End Sub
  19. S

    Incremental increase of Date field in form

    I am trying to incrementally advance my initial date value in a data entry form to save a step in data entry. Here is the code I'm working with: Private Sub Date_AfterUpdate() Me!Date.DefaultValue = "#" & Format(Me!Date + 1, "yyyy-mm-dd") & "#" End Sub This carries forward the first value...
  20. S

    Selecting records in one subform by clicking values in another subform

    I have a form with two subforms. I have been able to select records in a main form by clicking a value in a subform. But I am having trouble applying the technique to selecting records in subform "B" based on clicking a value in subform "A" (which is on a Tab Control). Private Sub...
Top Bottom