Search results

  1. B

    changing fonts in an automatic e-mail

    I have set up some code to send an e-mail. Is it possible to change some of the text to bold? This is what i have so far, it all works, but im trying to make it look clearer: strTitle = Nz(DLookup("Title", "TblTitle", "[No] = " & Me.No), 0) strScope = Nz(DLookup("Scope", "TblTitle", "[No] =...
  2. B

    Adding data to a new record via a macro

    Hi, I have a macro which deletes the information in a table and then runs an append query which imports 1 column of data to the, now empty, table. This is great, but I want to be able to add a new record every time it runs (e.g. "Add New"). I have found out how to add a new record, but i can...
  3. B

    Loop not giving expected output

    Oops, my mistake - i missed out the "s on that line! Works great now, thank you so much!
  4. B

    Loop not giving expected output

    Hi David, Thanks for your help so far... looks like i was way off the mark!! But now im getting an error on the line: StrTo = StrTo & ";" & rst("EmailAdd") The error is "Item not found in this collection" Any ideas?
  5. B

    Loop not giving expected output

    Hi, Ive just created a loop in my VBA code (1st one ive ever done) and im having some trouble getting it to output what i expected it to. I have some code before it which looks in a big table (TblA) and copies certain records into a smaller table (TblB) I want the loop to go through every...
  6. B

    Copying all current records in a subform

    The way the filters are working is this (I dont know if there is a better way, this is just the way i thought of 1st!) A simple version is this: I have a table with a column of names. I then have 5 columns which are set to yes/no. The main form holds these yes/no boxes. The subforms holds the...
  7. B

    Copying all current records in a subform

    So I can run a loop through every record in the new table. I have figured out how to copy the 1st record (by making a query and setting the criteria to call the subform) but i need to get them all in.
  8. B

    Copying all current records in a subform

    Hi, I am trying to find a way to copy all records currently shown in a subform. The main form has a lot of filter options, and rather than doing an if statement for each filter option, i was hoping to just copy every record that is on the screen. Any ideas?? Thanks
  9. B

    changing labels via VBA

    I apologise for missing that bit of information out! Ive set up a table now and a bit of code so i can update them and its working well. Thank you. :-)
  10. B

    changing labels via VBA

    Ah, that doesnt work either. If i go out of the form and back in the text boxes have reverted to blank. Do I have to store the names in a table or somethgn and link them that way?
  11. B

    changing labels via VBA

    I guess that would be an easy way round, yeah. I figured out how to make the box change, but i cant make it stay at the new name. I think I shall just go with yoru way! Thank you!
  12. B

    changing labels via VBA

    Hi, Is there a way to change the label of a text box via vba? I am setting up some filters, and 10 of them are set to custom1, custom2 etc. I want the user to be able to define the filter (that bits done) but then change the name from Custom1 to something more meaningfull. I thought i could...
  13. B

    Auto Fill field with color

    Ooh, I just remembered something that happened to me... Once it had gone red then it stayed red for all further records, if this happens, you might need to change the code to If IsNull(Me.CancelDate) Then [AccountNumber].BackColor = RGB(255,255,255) 'White Else [AccountNumber].BackColor =...
  14. B

    Outputing 1 report for every record in a recordset

    Right, Thanks again Mr.B. That worked great... but... Is there any way to do teh same thing with the total number? I want a "Page a of b" type thing, but at the moment i can only figure out how to reset the a, the b is still showing the total number of pages in the report!
  15. B

    Outputing 1 report for every record in a recordset

    Ah, I did try putting the page number in the footer, but i didnt know how to re-set it. Now i know its possible ill have a look. The link doesnt work though. Ill let you know how it goes! Thanks!
  16. B

    Serching for record number and tale out an Error msg

    Ok, i would put in something like: If nz(dcount("FieldA","TblA","[InvitationNo] ='" & Me.InvitationNo & "'"),0) = 0 then Else Me.InvitationNo = "" MsgBox "Number already in use" End if Where FieldA is any field whish is NEVER empty (ID/InvitationName/whatever), TableA is the table where...
  17. B

    Auto Fill field with color

    Ive used this before: If IsNull(Me.CancelDate) Then Else [AccountNumber].BackColor = RGB(255,0,0) End if Is your sub-form continuous though? If it isnt then it should work - Just put it in the OnCurrent event of the subform.
  18. B

    Serching for record number and tale out an Error msg

    Hum... Even on an after update you have to click outside the box for it to happen, other wise there is no way of telling the user has finished inputting. Does the count way sound like it might work? If so ill try and explain it better!
  19. B

    Serching for record number and tale out an Error msg

    Making the number a primary key in the table would mean that a duplicate could not be entered. Either that or you could try doing an after update, dcount with a where criteria of that number - which would could how many records have that number. If you add an nz function to the start and set...
  20. B

    Outputing 1 report for every record in a recordset

    Hi, I have a report which needs to be output. What I want to do is output the report for each discipline, however, for the page numbering/headings etc to work I need to output a report for each discipline seperately. eg: DoCmd.OpenReport "RepStatus", acViewPreview, , "[Discipline] = '" &...
Back
Top Bottom