Search results

  1. WineSnob

    Close form without saving record

    I have a form I would like to close without saving the record using a button. here is the code I have but it closes the form and it also writes the record to the table. Private Sub ClosewoSave_Click() Cancel = True Me.Undo DoCmd.close DoCmd.OpenForm "frmMenu" End Sub I found in a thread that...
  2. WineSnob

    Adding Decimals display wrong value

    That did it. Thanks to Minty and JHB.
  3. WineSnob

    Adding Decimals display wrong value

    That produces the result 0 and it is justified left like text.
  4. WineSnob

    Adding Decimals display wrong value

    I have 2 controls on a form cmbFed and cmbState both are formatted as fixed with decimal places as 2. They display the correct values. cmbFed = .18 cmbState = .06 When I add a new control to add the 2. =[cmbFed]+[cmbState] result is .18.06 instead of .24 It looks like it is treating them...
  5. WineSnob

    Using If to load correct form on DB open

    I am trying to load a form based on an if statement. I think my issue is that I have the DB set to Display form "frmSplash" on open. I have tried the following (frmSplash form load event) but it continues past the frmMenu and stops at the frmSplash. I want to open the DB and look to see if it is...
  6. WineSnob

    Where clause using max of

    Thanks AGAIN Paul
  7. WineSnob

    Where clause using max of

    I am trying to open a form using the where clause to max of a table field. I cannot get the syntax correct. DoCmd.OpenForm "frmInput", , , Max(tblClients.ClientID) AS MaxOfClientID FROM tblClients
  8. WineSnob

    Determine year from month count

    PERFECT... Worked like a charm. Thanks
  9. WineSnob

    Determine year from month count

    I have a table that has a field for month represented by a number. I would like to report by month but group by year. The report would group months 1-12 into year 1, months 13-24 into year 2, months 25-36 into year3, etc..... up to possible 20 years. Is there an easy way to identify and group...
  10. WineSnob

    Moving from one record to the next

    Hey Paul. I thought of that but didn't know what criteria to use. I filter the table down to the records related to the ProposalID only. There should only be a few records associated with each ProposalID maybe 5-6 max. Usually 2-3
  11. WineSnob

    Moving from one record to the next

    I have a table tblExtInc that has multiple records with fields StartYear EndYear Amount Inflation Freq Source 2 8 1000.00 .02 12 SS 6 10 2000.00 .00 12 Pension Here is the code I have to Update a table tblExternalIncomeSchedule It works fine and...
  12. WineSnob

    Loop understanding issue

    I am the first to admit I struggle with looping through records.:banghead: I am trying to loop through a table and collect external income data and write it to a new table. My issue may be the way the table is laid out. ??? The attached pictures show the tables. The tblExtInc is where the data...
  13. WineSnob

    Dlookup syntax

    No problem I have 2010 as well
  14. WineSnob

    Dlookup syntax

    If your want to post your db or just the a sample db with that table and form. I'll get it working. I'm retired and am looking for something to do.
  15. WineSnob

    Dlookup syntax

    Do you get a value if you "force" the lookup using ex.1 or 2 or some value that is in the table? Try using Me.Refresh after the code
  16. WineSnob

    Dlookup syntax

    Verify that txtAssetNumber is a number. Then try Me.txtDetectorNumber = DLookup("DetectorNumber", "AmmoniaDetectorT", "AssetNumber =" & 1) or Put a value you know is correct (where the 1 is) and will lookup in the syntax to verify it is working. I have also found in the past sometime if I...
  17. WineSnob

    Dlookup syntax

    Or try Me.txtDetectorNumber = DLookup("DetectorNumber", "AmmoniaDetectorT", "AssetNumber = " & Me.txtAssetNumber)
  18. WineSnob

    Dlookup syntax

    Try this Private Sub Form_Load() DoCmd.GoToRecord , , acNewRec Me.txtAssetNumber = Forms!DetectorManagementF!txtAssetNumber Me.txtDetectorNumber = DLookup("DetectorNumber", "AmmoniaDetectorT", "AssetNumber = Me.txtAssetNumber") End Sub
  19. WineSnob

    Tabbed Control Form disable navigtion?

    I have a tabbed control form that I an using as a survey form. It has Next and Back buttons to navigate the survey. Is it possible to disable the navigation feature of the tabs and allow the user to ONLY use the Next and Back buttons? Right now I have a label plastered over the tabs - It works...
  20. WineSnob

    Moving a rectangle box based on a value

    Thanks. That moves the box to the right. How do I "reset it" to the original position? How do I move it to the left? I have an on openevent Box1.Left = Box1.Left + (Me.RiskIndex * 10 + 500) If RiskIndex is 40 then it moves it to 400+500=9000 If the next time I open the form and RiskIndex = 10...
Top Bottom